Jump to content

Hugo

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by Hugo

  1. OK, I've taken Steve's suggestion and used the UART. I've written this code, to send a continuous stream of characters, with slight pauses between. When I run *this* one, data is definitely being sent, but the terminal acts like it's a string of carriage returns and the cursor just blinks faster but nothing gets printed. Is this the proper way to deal with the UART? /* * serial routines for 16f87x with UART */ char _TRISB@0x86; char _SPBRG@0x99; char _RCSTA@0x18; char _TXSTA@0x98; char _PIE1@0x8C; char _INTCON@0x0B; char _TXREG@0x19; #define GIE 0x0007
  2. The serial routines are so simple I'm not quite sure where I've gone wrong, but I have. If someone could set me straight I'd really appreciate it. I'm programming a 16F876 connected to my PC. I get output in my terminal, but it's garbled, as sometimes happens with incorrect baud rates. I've double-checked baud rate, turned off handshaking, etc., but I still get garbage. I assume that getchar() will begin working when I fix this problem, as the receive routines also don't respond (the program hangs waiting for input no matter what I send down the line). Here is my source code:
×
×
  • Create New...