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 device problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
David



Joined: 20 Jul 2005
Posts: 1
Location: BANGKOK, THAILAND

View user's profile Send private message

RS232 device problem
PostPosted: Tue Aug 16, 2005 9:59 am     Reply with quote

I have a problem problem with a serial reader that I've connected with a PIC 18F452.

It's working very well with my PC using this program :

OPEN "COM1:9600,N,8,1,RS,OP,CD0,DS0" FOR RANDOM AS #1

PRINT #1, CHR$(27); CHR$(69)

but I tried this program and many others commands too and it doesn't working because the reader seems to not receive the command (printf, ("%C%C"),...).

void main() {

int a, b;

a = 0x1b;
b = 0x45;

delay_ms(500);

putc(a);
putc(b);

while(1);
}

Do you think it'd be about a voltage problem on the RX pin of the reader and I need to use a TTL/RS232 converter chip ?

Thank you for your help

Kind regards,

David
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 16, 2005 11:27 am     Reply with quote

If the PC talks to the reader just fine and you are trying to talk to the same device with a PIC, then obviously you'll need a level translator such as a MAX232.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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