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

16F648A and 'CCS' UART on PORT RA1

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



Joined: 05 Aug 2006
Posts: 52

View user's profile Send private message Visit poster's website AIM Address MSN Messenger

16F648A and 'CCS' UART on PORT RA1
PostPosted: Sat Aug 05, 2006 5:48 am     Reply with quote

Hi all,

I've so far only been able to get UART to work as hardware on RB1/RB2 @ 19200baud. If I try to use anything higher, hypertrm just doesn't show a thing. Confused

So right now, I want to use RA1 as a the Tx pin, so I have this in my code:

Code:
#use rs232(baud=19200, parity=N, bits=8, xmit=PIN_A1)


This worked for like 2 seconds and then nothing, so I'm back to using:

Code:
#use rs232(baud=19200, parity=N, bits=8, xmit=PIN_B2)


...which should automatically implement hardware UART, and works fine, but I would like to put these ports to use. Any ideas? Rolling Eyes

Cheers,
Mike
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Sat Aug 05, 2006 7:32 am     Reply with quote

What speed are you running the processor at? That could provide a large clue. Also, does it work at slower speeds?

John
bsodmike



Joined: 05 Aug 2006
Posts: 52

View user's profile Send private message Visit poster's website AIM Address MSN Messenger

PostPosted: Sat Aug 05, 2006 11:39 am     Reply with quote

Hiya,

I gave up on hypertrm and installed SecureCRT. This is so much better and have got it running @ 19200 nicely. 16f648A @ 20Mhz btw.

Cheers, Mike
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Aug 05, 2006 12:02 pm     Reply with quote

Quote:
#use rs232(baud=19200, parity=N, bits=8, xmit=PIN_B2)
...which should automatically implement hardware UART

It doesn't. It's creating a software UART. You must specify both
hardware pins (rcv and xmit) in the #use rs232() statement to
generate code for a hardware UART.

Example: This will create a hardware UART.
Code:
#use rs232(baud=19200, xmit=PIN_B2, rcv=PIN_B1, ERRORS)
bsodmike



Joined: 05 Aug 2006
Posts: 52

View user's profile Send private message Visit poster's website AIM Address MSN Messenger

PostPosted: Sat Aug 05, 2006 12:49 pm     Reply with quote

aha!, thanks for that info. [st]What's ERRORS about? (I thought I read something on this somewhere hrm)[/st], cheers, just looked it up Smile
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