Page 1 of 1

RS232 with the 16F877A

Posted: Thu Nov 26, 2009 3:39 pm
by Rotac
Hello,

I'm testing with the RS232 card and tried to recieve data with the program "Simple Echo 16F877A"


when I run the program in simulate mode it works, but when you sent it to the board it works only one time?

In the first situation I used RC and it seems to be work and later I tried with crystal (HS) also set the switch also in the right position and it works one time, after then you have to reset the board, then I set it back to RC and it works only one time too!

Has anybody an explanation here for?

Rob

Re: RS232 with the 16F877A

Posted: Wed Dec 02, 2009 2:07 pm
by Benj
Hello

Can you attach your flowcode program to the forum and we will take a look for you. The RS232 will only work when the hardware is in XTAL mode, flowcode has the correct clock frequency to match the hardware crystal and the chip configuration is defined correctly. This allows the baud rate to be assigned correctly.

Re: RS232 with the 16F877A

Posted: Thu Dec 03, 2009 3:55 pm
by Rotac
Hello Ben,

thanks for your respond, in the mean time this probleme is solveld ( you must choose for XTal), I had an other question:
In the PICmicro Configuration (expert) "Slot 2" you can adjust config1: e.g. 0x3FA, but I have seen also other values.
Which value is OK and what are you adjusting?

Rob

Re: RS232 with the 16F877A

Posted: Thu Dec 03, 2009 4:01 pm
by Benj
Hello Rob

If you enter the value 0x3f3a then this is the default base setting for a crystal 4MHz or faster. (HS in the oscillator selection combo box)

If you enter 0x3f39 then this is for a crystal under 4MHz. (XT in the oscillator selection combo box)

If you enter 0x3f3b then this is for a RC oscillator compatible with the RC setting on our hardware. (RC in the oscillator selection combo box)

Re: RS232 with the 16F877A

Posted: Thu Dec 03, 2009 6:59 pm
by Rotac
Hello Ben,

Thanks for your fast respond

Rob