![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
i want to interface rs232 of pc with pic16f877. in pic side i like to use inbuilt serial ports how can use the serial ports of pic16f877 give me some examples for initilize pins,configure serial port,baud rate settingsand everything | |
| |
| | #2 | |
| Quote:
| ||
| |
| | #3 |
|
Do you need to use a MAX232 or equivalent on this PIC?
| |
| |
| | #4 | |
| Quote:
| ||
| |
| | #5 |
|
To set up the 232 in the pic16f877.h add : #use rs232(baud=9600 ,xmit=PIN_C6,rcv=PIN_C7) also youll want to define: #define puts(s) {printf(s); putchar(13); putchar(10);} #use fixed_io(C_OUTPUTS=PIN_C6) #byte port_C=7 in the .c code i used: printf(" hello world"); to sent the string to the serial buffer on the p.c. to my v.b program hope this helps | |
| |
| | #6 | ||
| Quote:
#use rs232(baud=9600 ,xmit=PIN_C6,rcv=PIN_C7) also youll want to define: #define puts(s) {printf(s); putchar(13); putchar(10);} #use fixed_io(C_OUTPUTS=PIN_C6) #byte port_C=7 in the .c code i used: printf(" hello world"); to sent the string to the serial buffer on the p.c. to my v.b program hope this helps | |||
| |
| | #7 |
|
I hope this can help you if you still stuck
| |
| |
| | #8 |
|
hai any one there , please provide me with a working ckt dig of max232 which can transmit data from a serial port to something(transmitter) which can receive data from something(receiver) to serial port
__________________ robosat 9884282216(india-chennai) | |
| |
| | #9 | |
| Quote:
| ||
| |
| | #10 |
|
I need help interfacing max232 to pic16f877. what should i do first and the sample code if you can help me how to initialized it so that i can transmit data between two PIC.
| |
| |
| | #11 |
| For two PICs, one don't need to use MAX232. If both PICs are on same power supply voltages level, e.g. +5V, and both has hardware USART feature, then just simply connect RX pin of one PIC to the TX pin of another and you are done regarding hardware.
__________________ L.Chung Last edited by eblc1388; 7th August 2008 at 02:09 PM. | |
| |
| | #12 | |
|
"...... Quote:
And can any one help me in software for this my amail id is ali.mir10v@gmail.com | ||
| |
| | #13 |
|
I have heard, often, that most PC's do not need level translation. Have not tried it. You can get the translators in a cable or very small board. There is a short list at: PC-Microcontroller Communications - Open Circuits | |
| |
|
| Tags |
| interface, pic, rs232, serial |
| Thread Tools | |
| Display Modes | |
| |