Truncated match.
PICList
Thread
'Serial interface problem'
1999\05\05@200400
by
Craig Lee
I am puzzled why when I try to interface the
transmit data line from an rs232 interface to
a pic through a 10k resistor to RA1 why it
ceases to operate. On a scope, the levels are
a nice 5-0.
Works fine with a max232. The only changes
I've made are to replace the max232 chip
with a 10k, and change my Rxdata define from
RA1 to !RA1.
I'm sure someone else has ran into this one.
Craig
1999\05\05@223317
by
g.daniel.invent.design
|
Craig Lee wrote:
>
> I am puzzled why when I try to interface the
> transmit data line from an rs232 interface to
> a pic through a 10k resistor to RA1 why it
> ceases to operate. On a scope, the levels are
> a nice 5-0.
>
> Works fine with a max232. The only changes
> I've made are to replace the max232 chip
> with a 10k, and change my Rxdata define from
> RA1 to !RA1.
if you now have [NOT] RA1 as above then the MAX232 should also NOT work
?
are you programming in C ? else you will need to swap bcf and bsf
instructions (and power on initialisation) to get equiv output states of
max232.
regards,
Graham D.
>
> I'm sure someone else has ran into this one.
>
> Craig
--
Steam engines may be out of fashion, but when you consider that an
internal combustion engine would require recovery of waste heat by
transfer just before top dead centre then fashion becomes rather
redundant, USE STRATIFIED HEAT EXCHANGERS ! and external combustion.
You heard it first from: Graham Daniel, managing director of Electronic
Product Enhancements.
Phone NZ 04 387 4347, Fax NZ 04 3874348, Cellular NZ 021 954 196.
1999\05\05@231653
by
Paul Davis
It's not clear if you mean the PIC doesnt work, or if your code no longer does.
Assuming the latter, I think you'll find that you need to invert your bits.
i.e.
the logic states are reversed without the max232.
Paul
At 06:02 PM 5/5/99 -0600, you wrote:
{Quote hidden}>I am puzzled why when I try to interface the
>transmit data line from an rs232 interface to
>a pic through a 10k resistor to RA1 why it
>ceases to operate. On a scope, the levels are
>a nice 5-0.
>
>Works fine with a max232. The only changes
>I've made are to replace the max232 chip
>with a 10k, and change my Rxdata define from
>RA1 to !RA1.
>
>I'm sure someone else has ran into this one.
>
>Craig
Paul Davis
Sr. Systems Engineer
OEM, Carrier Sales, Healthcare
spam_OUTpdavisTakeThisOuT
nbase-xyplex.com
http://www.nbase-xyplex.com
184 Shuman Blvd., Suite 200
Naperville, IL. 60563
Phone: 630-717-2960 x 3072
FAX: 630-357-4237
1999\05\06@003825
by
Bob Blick
At 06:02 PM 5/5/99 -0600, you wrote:
>with a 10k, and change my Rxdata define from
>RA1 to !RA1.
Sorry, ! will not work on a bit. You need at least a char.
Cheers,
Bob
http://www.bobblick.com/
1999\05\06@030203
by
Michael Rigby-Jones
It works fine for the Hitech C compiler:
main()
{
RA1 = !RA1;
}
compiles to:
19 ;c:\ht-pic\projects\misc\test.c: 5: RA1 =
!RA1;
20 03FC 1283 bcf 3,5
21 03FD 3002 movlw 2
22 03FE 0685 xorwf 5
23 ;c:\ht-pic\projects\misc\test.c: 6: }
Regards
Mike Rigby-Jones
{Quote hidden}> At 06:02 PM 5/5/99 -0600, you wrote:
> >with a 10k, and change my Rxdata define from
> >RA1 to !RA1.
>
> Sorry, ! will not work on a bit. You need at least a char.
>
> Cheers,
> Bob
>
>
http://www.bobblick.com/
1999\05\06@073031
by
Dr. Imre Bartfai
HI,
an idea: in this mode you should detecting a rising edge as a start bit
instead of falling one. Did you?
Imre
On Wed, 5 May 1999, Craig Lee wrote:
{Quote hidden}> I am puzzled why when I try to interface the
> transmit data line from an rs232 interface to
> a pic through a 10k resistor to RA1 why it
> ceases to operate. On a scope, the levels are
> a nice 5-0.
>
> Works fine with a max232. The only changes
> I've made are to replace the max232 chip
> with a 10k, and change my Rxdata define from
> RA1 to !RA1.
>
> I'm sure someone else has ran into this one.
>
> Craig
>
>
1999\05\06@125500
by
w. v. ooijen / f. hanneman
For me 10k worked fine.
Are you sure the problem is in the PC->PIC path?
The edges of the signal could be a bit different now,
so when your receive code was critical it could be just-off now.
maybe have the PIC copy the in pin to the out pin in a loop
and see whether you get an echo on the PC?
Wouter.
----------
{Quote hidden}> From: Craig Lee <
.....cleeKILLspam
@spam@ATTCANADA.NET>
> To:
PICLIST
KILLspamMITVMA.MIT.EDU
> Subject: Serial interface problem
> Date: Thursday, May 06, 1999 02:02
>
> I am puzzled why when I try to interface the
> transmit data line from an rs232 interface to
> a pic through a 10k resistor to RA1 why it
> ceases to operate. On a scope, the levels are
> a nice 5-0.
>
> Works fine with a max232. The only changes
> I've made are to replace the max232 chip
> with a 10k, and change my Rxdata define from
> RA1 to !RA1.
>
> I'm sure someone else has ran into this one.
>
> Craig
1999\05\09@084229
by
Dennis Plunkett
|
I think that the problem is in the code itself the function ! is a logical
NOT and not bitwise.
If you need to do bitwize then: -
void main (void)
void
main (void)
{
unsigend char i;
volatile unsigned char PORTVAL;
i =~PORTVAL; //bits now inverted
}
Hope this helps, I am assuming that you're using C
Dennis
At 22:10 5/05/99 -0500, you wrote:
>It's not clear if you mean the PIC doesnt work, or if your code no longer
does.
{Quote hidden}>Assuming the latter, I think you'll find that you need to invert your bits.
>i.e.
>the logic states are reversed without the max232.
>
>Paul
>
>At 06:02 PM 5/5/99 -0600, you wrote:
>>I am puzzled why when I try to interface the
>>transmit data line from an rs232 interface to
>>a pic through a 10k resistor to RA1 why it
>>ceases to operate. On a scope, the levels are
>>a nice 5-0.
>>
>>Works fine with a max232. The only changes
>>I've made are to replace the max232 chip
>>with a 10k, and change my Rxdata define from
>>RA1 to !RA1.
>>
>>I'm sure someone else has ran into this one.
>>
>>Craig
>
>Paul Davis
>Sr. Systems Engineer
>OEM, Carrier Sales, Healthcare
>
.....pdavisKILLspam
.....nbase-xyplex.com
>
http://www.nbase-xyplex.com
>184 Shuman Blvd., Suite 200
>Naperville, IL. 60563
>Phone: 630-717-2960 x 3072
>FAX: 630-357-4237
>
>
1999\05\09@172713
by
Craig Lee
I figure I should announce that I did fix the problem.
The problem was that I was trying to just ! the bit and be
happy. However, this doesn't seem to work bitwise or logically!
So I did this (Reader's digest condensed version):
#define RXNOTINV //rx bit is not inverted
#ifdef RXNOTINV
#ifdef RXNOTINV
for(;;)
{
while(RXD == 0) continue;
//delay 1/2 a bit
if(RXD == 0) continue;
//get a byte of data
//delay to start of stopbit
return ~c
}
#else
for(;;)
{
while(RXD == 1) continue;
//delay 1/2 a bit
if(RXD == 1) continue;
//get a byte of data
//delay to start of stopbit
return c
}
#endif
Thanks,
Craig
> {Original Message removed}
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- Today
- New search...