Subject:
|
Serial IO
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Sun, 8 Jun 1997 00:27:52 GMT
|
Original-From:
|
Joe Doubek <[i-roots@]IHateSpam[burgoyne.com]>
|
Viewed:
|
1403 times
|
| |
| |
I am trying to get my handyboard communicating with a TurboC program
through the com2 port on my computer. I have been attempting to use the routine
found in serialio.c on the website. Say I have an infinite loop setup on my
handyboard that looks something like this:
void main(void)
{
disable_pcode_serial();
while(1)
{
serial_putchar(98);
}
}
and I run a TurboC program using inport(int port) to read the value of com2
(2F8h or 760 decimal). I keep getting 0 when the handyboard is off, 254 when
it's on and doing nothing, and either 254 or 255 when I send various numbers
with serial_putchar(int) on the handyboard. Can anyone tell why this is? Am I
just looking at a base address and not the address I want? I do not have any
references to the 8088 UART so I don't know...
Also trying to send to the handyboard I am able to send numbers, but a similar thing happens... I'm using TC's outport(int port, int byte) command and sending various numbers to port 760 I receive 30, 120, 128, and 248 on my handyboard. Again I believe this is a similar problem where I am manipulating the wrong registers or do I need to maintain certain registers and only manipulate others? Any help would be great.... Joe
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|