USART programming
USART programming
I'm working on a PIC18f452, plugged into the HP-488-00-3 demo board, and I'm having issues with the USART. Does anyone have C source code for a simple USART RS232 protocol demonstration? It would be nice to get some for-sure-working code so that I can test the physical setup separately from my code.
No trees were harmed in the posting of this message. However, a large number of electrons were terribly inconvenienced.
- 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: USART programming
Hello
Which device are you using? Which clock speed? Which Baud rate required?
I will generate you the code to drive the particular device at the particular clock speed and baud.
Which device are you using? Which clock speed? Which Baud rate required?
I will generate you the code to drive the particular device at the particular clock speed and baud.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: USART programming
I'm programming with an MPLAB ICD2 debugger, the board is running off the RC circuit at 3.46MHz. Any baud rate is fine for now, probably something in the mid-range available with these settings.Benj wrote:Hello
Which device are you using? Which clock speed? Which Baud rate required?
I will generate you the code to drive the particular device at the particular clock speed and baud.
No trees were harmed in the posting of this message. However, a large number of electrons were terribly inconvenienced.
- 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: USART programming
Hello
Here is the complete C program for the RS232 UART running at a baud of 4800.
Here is the complete C program for the RS232 UART running at a baud of 4800.
- Attachments
-
- Flowcode1.c
- (7.48 KiB) Downloaded 513 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel