KiuFelix
Newbie level 5
With reference to the PIC16F628 example from https://www.oz1bxm.dk/PIC/628uart.htm, I have managed to setup the circuit has indicated in the circuit diagram. I am familiar with CCS C programming and hence I used the C code to generate the hex file.
The problem is that I don't get the signal correctly. What I get instead of "PIC16F628 alive" output in a loop, I get only part of the expected text eg PIC16 mixed with unreadable characters like:
The connection appears to be good acording to the site.
Kindly someone help. Let me know the point I am missing.
Thanks
The problem is that I don't get the signal correctly. What I get instead of "PIC16F628 alive" output in a loop, I get only part of the expected text eg PIC16 mixed with unreadable characters like:
Code:
PIC16F@~~"£~"~"
Kindly someone help. Let me know the point I am missing.
Thanks
Code:
[CODE]//************************************************************
// Function: Test the UART at 9600 baud
// Processor: PIC16F628 at 4 MHz using internal RC oscillator
// Hardware: Testboard K4
// Software: CCS PCM
// Author: Lars Petersen, oz1bxm@pobox.com
// Website: www.qsl.net/oz1bxm/PIC/pic.htm
//************************************************************
#include <16F628.h>
#fuses INTRC_IO, NOLVP, NOWDT, PUT, BROWNOUT
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=pin_B2, rcv=pin_B1)
main() {
printf("PIC16F628 alive\n\r"); // send alive message
while(true) {
putc(getc()); // echo the received characters
}
}