Loading ...
Sorry, an error occurred while loading the content.

Question about reading/writing to the ELF Disk/RTC card

Expand Messages
  • kjsjk48
    I think this is probably a question for Bob Armstrong, but someone else might be having the same problem or have some advice. I am trying to access the devices
    Message 1 of 6 , Jun 8, 2005
    • 0 Attachment
      I think this is probably a question for Bob Armstrong, but someone
      else might be having the same problem or have some advice. I am trying
      to access the devices on the Disk card using the monitor IN and OUT
      commands, but keep reading back '0D'. I can do 'OUT 4 xx' and byte
      'xx' shows up on the data displays. If I do 'IN 4' the display changes
      to '00' and the terminal reports 'Port 4 = 00'. But if I try to read
      the uart registers by

      OUT 2 10 ; to set up for reading uart reg 0
      IN 3

      I get back 'Port 3 = 0D'
      and the same thing if I try to read reg 7: OUT 2 17

      If I try to read say, NVR location 20, I think the procedure should be
      OUT 2 A0
      IN 3

      Doing 'SHOW RTC' tells me that there is an FF in that location (I have
      used the jumper to erase the NVR, so every location except the first
      ~16 or so, used by the clock and monitor to store several parameters)
      is FF, but I get back 'Port 3 = 0D' again. Am I doing something
      wrong? or won't the monitor commands work for this?

      I have looked at the Boot.asm code from V60, but I can't find the
      code for reading the RTC, just an address for the routine in eprom. Is
      that code available?

      Kevin
    • rileym65
      Kevin, I cannot tell you about the monitor in and out commands, but bios code for reading/writing the RTC/UART/ETC is part of the Elf2k extension of my BIOS.
      Message 2 of 6 , Jun 8, 2005
      • 0 Attachment
        Kevin,
        I cannot tell you about the monitor in and out commands, but bios
        code for reading/writing the RTC/UART/ETC is part of the Elf2k
        extension of my BIOS. You can grab the source for this off of my
        website and examine the code that reads/writes everything on the disk
        card.
        Mike

        --- In cosmacelf@yahoogroups.com, "kjsjk48" <kjsisson@b...> wrote:
        > I think this is probably a question for Bob Armstrong, but someone
        > else might be having the same problem or have some advice. I am trying
        > to access the devices on the Disk card using the monitor IN and OUT
        > commands, but keep reading back '0D'. I can do 'OUT 4 xx' and byte
        > 'xx' shows up on the data displays. If I do 'IN 4' the display changes
        > to '00' and the terminal reports 'Port 4 = 00'. But if I try to read
        > the uart registers by
        >
        > OUT 2 10 ; to set up for reading uart reg 0
        > IN 3
        >
        > I get back 'Port 3 = 0D'
        > and the same thing if I try to read reg 7: OUT 2 17
        >
        > If I try to read say, NVR location 20, I think the procedure should be
        > OUT 2 A0
        > IN 3
        >
        > Doing 'SHOW RTC' tells me that there is an FF in that location (I have
        > used the jumper to erase the NVR, so every location except the first
        > ~16 or so, used by the clock and monitor to store several parameters)
        > is FF, but I get back 'Port 3 = 0D' again. Am I doing something
        > wrong? or won't the monitor commands work for this?
        >
        > I have looked at the Boot.asm code from V60, but I can't find the
        > code for reading the RTC, just an address for the routine in eprom. Is
        > that code available?
        >
        > Kevin
      • Robert Armstrong
        ... This is correct... ... Assuming you mean $20 (hex), then this is correct too. On mine I can read ... Port 3 = 55 ... Port 3 = AA ... 0 1 2 3 4 5 6
        Message 3 of 6 , Jun 8, 2005
        • 0 Attachment
          > OUT 2 10 ; to set up for reading uart reg 0
          > IN 3

          This is correct...

          >If I try to read say, NVR location 20,
          >I think the procedure should be
          > OUT 2 A0
          > IN 3

          Assuming you mean $20 (hex), then this is correct too. On mine I can read
          and write location $20 in the NVR by doing this:

          >>>out 2 a0
          >>>in 3
          Port 3 = 55
          >>>out 2 a0
          >>>out 3 aa
          >>>out 2 a0
          >>>in 3
          Port 3 = AA
          >>>
          >>>show rtc
          0 1 2 3 4 5 6 7 8 9 A B C D E F
          7D00> 26 00 08 00 00 00 01 01 01 00 20 07 10 80 00 1B &.........
          ......
          7D10> 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
          .................
          7D20> AA FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
          *...............
          7D30> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
          .................
          7D40> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
          .................
          7D50> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
          .................
          7D60> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
          .................
          7D70> FF FF FF FF FF FF FF FF FF FF FF FF FF FF 40 F5
          ...............@u
          >>>

          (Remember that you have to reload the address register EVERY time you
          acccess the RTC!)

          Sounds like your board may have a problem - does anything work?

          > I have looked at the Boot.asm code from V60, but I can't find the code for
          reading the RTC,
          >just an address for the routine in eprom. Is that code available?

          As Mike said, the actual code for the RTC, disk and UART is in the BIOS.
          However you may find it helpful to read the monitor's self test for the
          UART, disk and RTC. It starts around RTCINI: and the page heading says
          "Option Board Initialization (RTC)" ...

          Bob
        • kjsjk48
          ... can read ... Everything I have tested so far works except this. However, I just tried using the onboard bit-banged port, and that worked with the example
          Message 4 of 6 , Jun 8, 2005
          • 0 Attachment
            --- In cosmacelf@yahoogroups.com, "Robert Armstrong" <bob@j...> wrote:
            >
            > > OUT 2 10 ; to set up for reading uart reg 0
            > > IN 3
            >
            > This is correct...
            >
            > >If I try to read say, NVR location 20,
            > >I think the procedure should be
            > > OUT 2 A0
            > > IN 3
            >
            > Assuming you mean $20 (hex), then this is correct too. On mine I
            can read
            > and write location $20 in the NVR by doing this:
            >
            > >>>out 2 a0
            > >>>in 3
            > Port 3 = 55
            > >>>out 2 a0
            > >>>out 3 aa
            > >>>out 2 a0
            > >>>in 3
            > Port 3 = AA
            > >>>
            > >>>show rtc
            > 0 1 2 3 4 5 6 7 8 9 A B C D E F
            > 7D00> 26 00 08 00 00 00 01 01 01 00 20 07 10 80 00 1B &.........
            > ......
            > 7D10> 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
            > .................
            > 7D20> AA FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
            > *...............
            > 7D30> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
            > .................
            > 7D40> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
            > .................
            > 7D50> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
            > .................
            > 7D60> FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
            > .................
            > 7D70> FF FF FF FF FF FF FF FF FF FF FF FF FF FF 40 F5
            > ...............@u
            > >>>
            >
            > (Remember that you have to reload the address register EVERY time you
            > acccess the RTC!)
            >
            > Sounds like your board may have a problem - does anything work?
            >

            Everything I have tested so far works except this. However, I just
            tried using the onboard bit-banged port, and that worked with the
            example you gave above. I switched back to the uart port, and still
            get 0D, although SH RTC gives me an AA in location 20. Doing the
            OUT/IN procedure again with a different byte still returns 0D, and SH
            RTC showa that the AA is still there. So I must have some problem on
            the disk board. I guess I will have to check all the traces and solder
            joints again. I pulled the CF card, but that made no difference. Any
            suggestions?

            Kevin
          • Robert Armstrong
            ... using the ... Oh - ah, well, ... This is not going to work if you re using the UART for the serial port. After all, every time the monitor needs to read
            Message 5 of 6 , Jun 8, 2005
            • 0 Attachment
              >Everything I have tested so far works except this. However, I just tried
              using the
              > onboard bit-banged port, and that worked with the example you gave above.

              Oh - ah, well, ... This is not going to work if you're using the UART for
              the serial port. After all, every time the monitor needs to read or write a
              character from the terminal, it has to change the select register on the
              disk card. Anything you write there with the OUT command is just going to
              get trashed as soon as the monitor types the next character.

              You'll have to use the motherboard serial port for this kind of testing.
              Since you said that works, I think you're OK.

              Bob
            • kjsjk48
              ... tried ... above. ... UART for ... write a ... going to ... testing. ... Makes sense. The 0D is probably the carriage return at the end of the command.
              Message 6 of 6 , Jun 8, 2005
              • 0 Attachment
                --- In cosmacelf@yahoogroups.com, "Robert Armstrong" <bob@j...> wrote:
                >
                > >Everything I have tested so far works except this. However, I just
                tried
                > using the
                > > onboard bit-banged port, and that worked with the example you gave
                above.
                >
                > Oh - ah, well, ... This is not going to work if you're using the
                UART for
                > the serial port. After all, every time the monitor needs to read or
                write a
                > character from the terminal, it has to change the select register on the
                > disk card. Anything you write there with the OUT command is just
                going to
                > get trashed as soon as the monitor types the next character.
                >
                > You'll have to use the motherboard serial port for this kind of
                testing.
                > Since you said that works, I think you're OK.
                >
                > Bob

                Makes sense. The 0D is probably the carriage return at the end of the
                command. Perhaps you should put a mention of this in the next version
                of the manual. Also, there appears to be a slight mistake in the HELP
                info. It says that the format for setting the clock is dd/mm/yyyy,
                but in the boot.asm code it says the format is mm/dd/yyyy, which
                appears to be correct. I first set it as dd/mm... and the next day the
                date was wrong. Setting it mm/dd... gives the correct day setting the
                next day.


                Kevin
              Your message has been successfully submitted and would be delivered to recipients shortly.