| View previous topic :: View next topic |
| Author |
Message |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
| Re: reply |
Posted: Tue Jul 05, 2005 8:29 am |
|
|
| Sophi wrote: | Thanks Humberto-
Yes I read everything in the forum - that's how I chose all my settings for Hyperterminal!
I am using a Protoboard (Olimex) that comes with a MAX232 chip. I've connected TX from the MAX232 to PIC- C6 and RX from MAX232 to PIC C7. I'm using a PIC16C74A.
Any advice is appreciated!
Sophi |
This is your problem. Take a look at the schematic
http://www.olimex.com/dev/images/pic-p40b-sch.gif
They have Rx going to T2in. This is not Rx of the PIC but rather the Rx signal of the other device. You should have this connected to Tx (C6) of the pic and Tx should be connected to Rx (C7) of the pic. |
|
 |
Sophi
Joined: 14 Jun 2005 Posts: 64
|
|
Posted: Tue Jul 05, 2005 8:51 am |
|
|
thanks Mark-!
Now pin C6 and C7 are high but still nothing from Hyperterm. Is there something else I need for the settings? Should the received words just come up on the screen or do I need to "ask" HT for it?
Sophi |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Jul 05, 2005 8:54 am |
|
|
| According to the schematic, you should not be using a Null cable. |
|
 |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Tue Jul 05, 2005 9:16 am |
|
|
The previous code I post was just to know if your hardware was running.
To get some "burst" with a scope you need a code like this:
| Code: |
#include <16c74a.H>
#fuses HS,NOPROTECT,NOWDT,NOBROWNOUT,PUT
#use delay(clock=20000000) // adjust for resonator frequency
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
main()
{
setup_adc_ports(NO_ANALOGS); // sets port A all digital
do
{
output_toggle(PIN_A0);
printf("1234567890");
delay_ms(100);
}while(1);
}
|
Be aware that you must change your scope trigger setup to the levels you will find in figure
"One byte of async data" in this link:
http://www.arcelect.com/rs232.htm
and connecting your scope in the DB9 pin 3 (RS232 Tx) you would "see" the output
signals string every 100 msec.
Keep well,
Humberto |
|
 |
Sophi
Joined: 14 Jun 2005 Posts: 64
|
|
Posted: Tue Jul 05, 2005 9:34 am |
|
|
My PIC speaks to HTerm!
No NULL cable-
Switched TX and RX wires...Thanks!
Mark- I am looking at my schematic and I would never have figured that out from it, what do you see on there that says RX and TX do not go to PIC? And how would I know for future about using NULL or not?
Now to work out how to speak to my PIC from HT....?
Sophi |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Jul 05, 2005 9:35 am |
|
|
| Pin 2 is the output on the proto board. |
|
 |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Jul 05, 2005 9:38 am |
|
|
| Sophi wrote: | My PIC speaks to HTerm!
No NULL cable-
Switched TX and RX wires...Thanks!
Mark- I am looking at my schematic and I would never have figured that out from it, what do you see on there that says RX and TX do not go to PIC? And how would I know for future about using NULL or not?
Now to work out how to speak to my PIC from HT....?
Sophi |
I looked at the MAX232 chip. Outputs should go to inputs and inputs should go to outputs. As far as the Null cable goes, if both devices have the same pin out then you will need the Null cable. You can find the pin out for a standard pc serial port on the net. |
|
 |
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Tue Jul 05, 2005 11:50 am |
|
|
Five days ago I suggested you to check this:
| Code: |
PIC MAX232
PIN_C6 >-------- Should be PIN 10 or 11
PIN_C7 <-------- Should be PIN 12 or 9
|
and your answer was:
| Quote: |
All is wired as it should be (Thanks Humberto!)
|
I assume that check means hardware debug not simply reading a schematic.
Humberto |
|
 |
Sophi
Joined: 14 Jun 2005 Posts: 64
|
|
Posted: Tue Jul 05, 2005 1:14 pm |
|
|
Yes I had switched the wires a couple of times- back and forth, trying everything. Now with no null cable plus right wiring and HT configured right, all is
Thanks so much for all your help everyone-
Everything works great!
Sophi |
|
 |
|