RS232 Baud Rate? Interrupts
Posted: Mon Dec 03, 2012 1:08 am
Hi,
Im trying to communicate with a PIC via PC Terminal.
I have the terminal set at a Baud rate of 9600. My Pic is set at 8Mhz
The PIC baud rate on my pic is also set at 9600, and im using the software Uart as the PIC does not have Hardware Uart.
Running on the PIC are 2 interrupts. Interrupt 1 is interrupting at 100hz, it senses the zero crossing of a mains line.
Interrupt 2 is interrupting at 10Khz, it interrupts every 100uS.
Due to these interrupts it throws out the baud on the uart and im not exactly sure how to fix it. Disabling the interrupts fixes the communication problem and data is sent and received correctly, however these interrupts have to run constantly to work correctly.
I have looked at pretty much all the threads in the forum to try and find a solution and all i can see is that you have to use the custom setting in the baud to fix the problem. Is there some sort of formula that is required to calculate this?
Any help on this would be great.
Im trying to communicate with a PIC via PC Terminal.
I have the terminal set at a Baud rate of 9600. My Pic is set at 8Mhz
The PIC baud rate on my pic is also set at 9600, and im using the software Uart as the PIC does not have Hardware Uart.
Running on the PIC are 2 interrupts. Interrupt 1 is interrupting at 100hz, it senses the zero crossing of a mains line.
Interrupt 2 is interrupting at 10Khz, it interrupts every 100uS.
Due to these interrupts it throws out the baud on the uart and im not exactly sure how to fix it. Disabling the interrupts fixes the communication problem and data is sent and received correctly, however these interrupts have to run constantly to work correctly.
I have looked at pretty much all the threads in the forum to try and find a solution and all i can see is that you have to use the custom setting in the baud to fix the problem. Is there some sort of formula that is required to calculate this?
Any help on this would be great.