|
|
View previous topic :: View next topic |
Author |
Message |
Tyrone Roach Guest
|
how does the RS-232 I/O work |
Posted: Sun Nov 18, 2001 5:08 pm |
|
|
I am new to the whole PIC programming scene. I recently just bought the 16f877 along with the programmer, prototyping board, and ICD board. I was wondering how does the RS-232 programs work. I have everything hooked up like the programs say and when I put the PIC in the board it just sits there as I am pressing the keys.
I recall in one of my programming classes you needed a .exe file ran in DOS to show the printf statements and recieve input.
If anyone has an ideal about this rather trivial problem, I would appreciate the help
Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 1205 |
|
|
Sherpa Doug Guest
|
Re: how does the RS-232 I/O work |
Posted: Tue Nov 20, 2001 8:21 am |
|
|
:=I am new to the whole PIC programming scene. I recently just bought the 16f877 along with the programmer, prototyping board, and ICD board. I was wondering how does the RS-232 programs work. I have everything hooked up like the programs say and when I put the PIC in the board it just sits there as I am pressing the keys.
:=
:=I recall in one of my programming classes you needed a .exe file ran in DOS to show the printf statements and recieve input.
:=
:=If anyone has an ideal about this rather trivial problem, I would appreciate the help
:=
:=Thanks
Can you give us more detail about what you are trying to do? Do you have anything like a scope or a breakout box that can show you the signals on the RS232 wires?
Generally you set up the UART (hardware or software) and use getc() or putc() to receive or send bytes...
Do you have a terminal program for your PC? I do not recommend Hyperterm for Windows, through the OS/2 version was good.
Sherpa Doug
___________________________
This message was ported from CCS's old forum
Original Post ID: 1248 |
|
|
Dave Y. Guest
|
Re: how does the RS-232 I/O work |
Posted: Tue Nov 20, 2001 5:21 pm |
|
|
I use Hyperterminal in Windows for a test send/recv program. Do you have any kind of test equipment to determine if your data is getting to the PIC?
You need to dedicate a few pins to driving LEDs for test indicators. (i.e. Toggle a pin every time you receive a character or get an interrupt for an incoming character).
If you are connecting directly to the PIC from the PC the receive polarity is backward. You have to use a 7404 to invert the signal or an RS232 receiver (which does this automatically). The line should be idling high at the PIC input when not receiving a character and going low when bits come in.
Dave
:=I am new to the whole PIC programming scene. I recently just bought the 16f877 along with the programmer, prototyping board, and ICD board. I was wondering how does the RS-232 programs work. I have everything hooked up like the programs say and when I put the PIC in the board it just sits there as I am pressing the keys.
:=
:=I recall in one of my programming classes you needed a .exe file ran in DOS to show the printf statements and recieve input.
:=
:=If anyone has an ideal about this rather trivial problem, I would appreciate the help
:=
:=Thanks
___________________________
This message was ported from CCS's old forum
Original Post ID: 1264 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|