Jump to content
Sign in to follow this  
kf00115

Using Harware And Software Uart For Pic

Recommended Posts

Hi

 

I think that answer has a generic question that aplies to all compilers.

If you are using the (E)USART hardware, you are restricted to the hardware defined pins, don't forget that some PICs have function steering on I/O pins.

 

If you are bit-banging communications (software implemented protocol) you can use any generic digital I/O pins.

 

 

Best regards

Jorge

Share this post


Link to post
Share on other sites

It'is ok.But i asked i can use Hardware USART and SOFTWARE USART togheter.

In my old project i used hardware usart to read GPS ( EM406A ) with dedicaded PINS, then i use 2° usart, software, to read BarCodeReader (other casual pins) and 3° software usart to communicate with SIM908. (other casual pins). Paul

Share this post


Link to post
Share on other sites

For example in my old project i used a compiler whit 2 instrucion:

 

SEROUT pin,baudrate, text

 

SERIN pin,baudrate ,text

 

if i select pin of harware uart it work wirh hardware uart

 

if i select every all pin i have 1,2,3,4... software uart

 

Can i doo the same with sourceboostC ?

 

Thanks Paul

Share this post


Link to post
Share on other sites

Hi

 

Yes, it can be done.

 

As I never used them, I'm not sure if the available lib functions are suitable for it, I mean the same functions for both hardware and software USART.

In a worst case scenario, you might be able to use the lib functions for one type of USART and write your own for the other type.

 

BTW: Besides looking in the available libs, don't forget to look at the "example code" page at the Sourceboost site, you might find some contributed code and links that can be useful

 

 

Best regards

Jorge

Edited by JorgeF

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×