RS232 with the 16F877A

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
Rotac
Posts: 54
Joined: Fri Oct 02, 2009 1:41 pm
Been thanked: 1 time
Contact:

RS232 with the 16F877A

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 with the 16F877A

Post 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.

Rotac
Posts: 54
Joined: Fri Oct 02, 2009 1:41 pm
Been thanked: 1 time
Contact:

Re: RS232 with the 16F877A

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: RS232 with the 16F877A

Post 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)

Rotac
Posts: 54
Joined: Fri Oct 02, 2009 1:41 pm
Been thanked: 1 time
Contact:

Re: RS232 with the 16F877A

Post by Rotac »

Hello Ben,

Thanks for your fast respond

Rob

Post Reply