CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rs232 software
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Thu Dec 06, 2012 10:30 am     Reply with quote

At this stage, you've not convinced me your PC's working properly as a terminal.

You can't make any progress 'til you confirm the loop-back test works.

It's already been explained twice (by temtronic and myself).

Mike
andys



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

rs232 software
PostPosted: Mon Dec 10, 2012 4:12 am     Reply with quote

I did the loop-back test and is ok.

I tend to believe that the problem is at the component MAX232 so I have already order another component (MAX3232) when I receive it I will check it.
asmallri



Joined: 12 Aug 2004
Posts: 1680
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Dec 10, 2012 7:54 am     Reply with quote

Did you work out why the LED was flashing too fast?

Oh wait, you never told anyone if the LED was flashing or not. We should have guessed that ourselves.

It reminds me of the call to support...

Customer: My computer is not working.
Support: Is the computer turned on?

Customer: Yes.
Support: Is the monitor turned on?

Customer: Yes.
Support: Does the computer have any lights on?

Customer: No.
Support: Can you check to see if the power cord is plugged into the computer correctly.

Customer: No, I cannot see the power cord
Support: Why not?

Customer: It is too dark
Support: Can you turn on the lights?

Customer: No - there is a blackout - we have no power
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
andys



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

rs232 software
PostPosted: Wed Dec 19, 2012 8:35 pm     Reply with quote

Finally I replace the max232 component with max3232 but the problem is still there (nothing appear at screen) - the led is blinking.

I used the code:
Code:

#include <33fj128GP802.h>

#fuses HS
#fuses NOWDT           // No Low Voltage Program, No Watchdog timer
#fuses NOPROTECT              // Code no protection
#use delay (clock=20000000)   // Use built-in function: delay_ms() & delay_us()

#PIN_SELECT U1TX=PIN_B14
#PIN_SELECT U1RX=PIN_B15
#USE RS232(UART1,ERRORS,BAUD=9600)


void main()
{

while(1)
  {
   puts("A");
   printf("HELLO");
   puts("\n");
   output_low(pin_A0);
   delay_ms(500);
   //puts("A");
   //puts("\n");
   output_high(pin_A0);

   delay_ms(500);
  }
}
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Wed Dec 19, 2012 10:05 pm     Reply with quote

Hi,

You'll have to describe your wiring to us. The Tx pin on the PIC goes to which MAX3232 pin? What are the connections from the MAX3232 to you serial connector? What is the connector, and what pins are you using? What cable are you using to connect your board to the PC?

Do you have a voltmeter? What voltage do you see on pin 2 and 6 go the MAX3232? These are the charge pump output pins. What capacitors are on the MAX3232 pins?

John
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Dec 19, 2012 10:47 pm     Reply with quote

We assume that you have a hardware like this between your PIC and the PC:
http://www.best-microcontroller-projects.com/image-files/rs232_pic_connections_schematic.png

Check your wiring and the capacitors polarities in the MAX3232 transceiver pins, use a voltmeter and check the pump
converter voltages, should read close to +9V (Pin 2) and -9V (Pin 6) respectively against GND.
Select 'Serial' in the Putty connection options, and 9600 N 8 1 NONE in the Speed(Baud), Data bits, Stop bits, Parity
and Flow control respectively and be sure that the 'Serial Line to connect to' must match with the PC Com Port that
you are using during your test.


Humberto
andys



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

rs232 software
PostPosted: Thu Dec 20, 2012 4:23 am     Reply with quote

How can i upload an image? (i created a diagram with the connection of the max3232 and pic ) but i don't know how to upload it here.[/img]
Ttelmah



Joined: 11 Mar 2010
Posts: 20161

View user's profile Send private message

PostPosted: Thu Dec 20, 2012 5:18 am     Reply with quote

You can't.
You just upload it somewhere else, and post a link. If you just do a direct like, it will show like Humberto's png link, or if you use the img button, you can 'embed' the link as an image for display.

Best Wishes
andys



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

rs232 software
PostPosted: Thu Dec 20, 2012 7:52 am     Reply with quote

The diagram which i used is presented at :

http://obrazki.elektroda.pl/5538553600_1356011391.png
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Dec 20, 2012 9:00 am     Reply with quote

Hi,

Your schematic is really poor because it does not show the pin functionality
of the MAX3232 chip like the one that Humberto posted......

Take a very close look at the differences between the known good schematic
and the one you posted. Pay close attention to the wiring of the serial port
connector. You will see that the connections to pin 2 and pin 3 are reverse
between the two schematics. This is the likely cause of your problem!

It does depend on the type of serial cable you are using, "Null Modem" vs.
"Straight-Thru", but you never answered that question, so I'll assume you
have the correct cable (Straight-Thru), and the issue is your connector
wiring.

Reverse the wiring to pin 2 and 3 on the "PC Port" connector and see if it
works!

John
temtronic



Joined: 01 Jul 2010
Posts: 9658
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Dec 20, 2012 9:13 am     Reply with quote

comment..

classic pin swap....sigh..

For decades pin 2 was transmit, pin 3 rcv on DB-25 connections
THEN
'someone' decided to swap them when DE-9 connectors became the new standard

It's taken me years to retrain the brain...2= rcv, 3=xmt...

so much for 'legacy standards'
bkamen



Joined: 07 Jan 2004
Posts: 1619
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Dec 20, 2012 11:20 am     Reply with quote

temtronic wrote:
comment..

classic pin swap....sigh..

For decades pin 2 was transmit, pin 3 rcv on DB-25 connections
THEN
'someone' decided to swap them when DE-9 connectors became the new standard

It's taken me years to retrain the brain...2= rcv, 3=xmt...

so much for 'legacy standards'


I remember those days -- the "dual standard" is still around... although:

On modems, the pin described on the bottom was the signal from the PC you wanted to hook to a given pin.. (as printed) but the actual signal on the modem was the complement.

It drove (drives) me nuts too because it was only SOME modem manufacturers.

The DE-9M on the computer was always the same..

It was the MODEMS that had identity issues.

(shaking head)
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Thu Dec 20, 2012 4:12 pm     Reply with quote

Andys, you have received many tips and help regarding your consult, we expect from a beginner that all the tips and helps
received from the experienced members of this forum were applied and tested, and later we expect a feedback of your own
experience. This imperceptible interaction is the key for a virtuous cycle of teaching-learning in a forum and in real life.

This not a personal issue and I hope no to be unpolite with you.


best regards,

Humberto
andys



Joined: 23 Oct 2006
Posts: 175

View user's profile Send private message

rs232 software
PostPosted: Sun Dec 23, 2012 12:37 pm     Reply with quote

Because the desktop which i used has a lot of of problems, so i moved to my laptop (using a usb to rs232 converter).

I can't see anything to my screen. The led is blinking but the putty screen is empty. Furthermore when i use usb to rs232 converter what options i need to choose.?

(for example i need to choose serial option or not ? )
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Mon Dec 24, 2012 8:03 am     Reply with quote

Hi andys,

After the most recent set of posts, I felt sure you were going to come back
here and tell us "it works!". Instead, you've introduced yet another unknown
(the USB-to-Serial adapter) into the mix, and you still can't make it work.....
What happened to your desktop computer in the 10 days since you reported
a successful "loopback" test?

I don't know anything about 'Putty' except that it has about 1000 times the
horsepower you need for a simple serial comms. test. Why not try something
like Hyperterminal or Realterm for this test? With either, you'll need to select
the correct COM port number for your adapter, and the proper serial port
parameters (baud, etc.), and you should be good to go!


You know, after reviewing this thread a bit, I realized that you never
confirmed that your LED is blinking at the correct rate, only that it's
'blinking'..... It's critical that it's turning Off for a 1/2 second, and On
for a 1/2 second, and not slower or faster than this. Can you confirm the
proper operation of the LED?

John
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
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