VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time ]
Subject: RS232 problem


Author:
Per Medin
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 08:57:01 06/09/03 Mon

Hello

I have some problems with the RS232 interface, my PIC is a 16F873 and i have a MAX232 to fix the signal levels.

I'm using the following code to test the port, but i can't get it to work.

processor 16F873;

cfgword cp_off,pwrte_on,wdt_off,hs_osc,lvp_off,bod_off;

uses rs232;

procedure main;
Var r;

begin
RS232_Init(1);

Repeat
If RS232_IsData Then
Begin
r := RS232_Receive;
RS232_Send(r);
End;
Until False;

end;

I'm using a 4Mhz resonator and have set SPBRG:=25; (2400bps). If i make a jumper between in and out pin on MAX232's 5v side it echo's what i send, but the PIC doesn't. I know that the code RS232_IsData never gets true (i have tested with a led on port A).
Is there anyone who has some suggestions of what i may have done wrong.

And now to something totally different.
I have made my own variant of the lcdunit which uses totally 6 pins on the PIC (4pin interface 4pin control)
If anyone is interested please drop me a mail.

Per Medin

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Replies:
Subject Author Date
Re: RS232 problemJano09:39:57 06/10/03 Tue


Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]


Forum timezone: GMT-8
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.