Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

UART memory location


  • Please log in to reply

#1
wvphysicist

wvphysicist

    New Member

  • Member
  • Pip
  • 1 posts
I am new so I hope everything is in order. I am trying to setup digital control of slow simple peripherals. All I need is the address of my UART.
I am trying to locate the UART in RAM and it is not working. I have a '486 running windows 3.1.1 and using Microsoft quick basic.
This code prints numbers which are supposed to change when the com2 uart sees a change to its handshake lines. It does not respond when I apply a minus 3V to the four handshaking lines.

REM Psnoop.bas looks at serial port addresses
'WARNING AVOID location 238 = hex EE it causes a shutdown and restart. I do not know why.
'com1 03f8, com2 02f8, com3 3e8, com4 2e8
'Pick COM2 since COM1 is broken..
'Ports directory: 8 data, 9 irc, a irdat, b lc, c handshake t, d handshake t, e handshake r, f scratch
DEF SEG = 0
'com2 &H2F8= 760, KBD= &H60= 96, Clock &H70 = 112 None of these work.
PRINT "Reading RAM."
a = 760
PRINT a
FOR j = 1 TO 40 'Keep looking 40 times for a change while I plug in wires to pins.
FOR i = 0 TO 7 ' Reads all 8 registers in the UART
x% = INP(a + i) 'PEEK does not work here. Input does
PRINT x%;
NEXT i
PRINT
SLEEP 2 'Give me a chance to look at the screen.
NEXT j
  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP