Hello everyone,
does anyone have a working example using a 16f628a USART? I am trying to just send a byte and echo it back to the serial terminal. I am using a Easypic7. Thanks for any help.
Printable View
Hello everyone,
does anyone have a working example using a 16f628a USART? I am trying to just send a byte and echo it back to the serial terminal. I am using a Easypic7. Thanks for any help.
Thanks for the reply Mackrat. I will try it,but I don't see how that will work for a 16F628a.
Hi Mackrackit,
Im using a 16f628a and it looks like the code is for a 16F877a or something because it uses port C 6 and 7 for rx and tx. anyway I got something working. it turns out that on a easypic7 when using a 16f pic I needed to use the 18B socket. so once I got the right socket everything started working. thanks.
Look at the Datasheets. 16F877 uses C6 and C7 as you say, but the 16F628 used B1 RX and B2 TX
the only thing that I can see needs changing from a quick glance is the line....
TRISC = %10111111
to
TRISB = %11111011
What is 16f628a usart ???:confused:
UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER (USART)
RX=receive
TX=transmit
Look at Hserin/Hserout commands in PBP manual.
Info on 16F628A can be found here:
http://ww1.microchip.com/downloads/e...doc/40044f.pdf
Robert