Jump to content
Sign in to follow this  
plaasjaapie

Serial Comms In Basic For Pic

Recommended Posts

Before I grit my teeth and spend the time to convert some c code that does serial coms for the PIC16 series (specifically the 16F628, not that that much matters), has anybody already written code in Basic to do this?

Share this post


Link to post
Share on other sites
Before I grit my teeth and spend the time to convert some c code that does serial coms for the PIC16 series (specifically the 16F628, not that that much matters), has anybody already written code in Basic to do this?

 

Sorry, I finally found the code that Punerjot Mangat wrote. I thought that his init routines for the 16F877 were missing, but I found them in the lib folder. False alarm. :-s

Share this post


Link to post
Share on other sites

Okay, I've been hammering the sample code for the UART serial comms all day with no joy. Has anybody tried to programme the UART for a PIC16F628 chip on any of the SourceBoost compilers? I'm probably missing doing something obvious. That's my usual mode. All the same, I need some help. :-(

Share this post


Link to post
Share on other sites

Has anybody had any experience with programming the UART on the PIC16F628 using any of the SourceBoost compilers. I'm trying to adapt the example code for the BoostBasic compiler from the PIC16F877 that it is written for to the 16F628. Getting it right seems to be eluding me so far. :-(

Share this post


Link to post
Share on other sites

Dear Plaasjaapie,

 

The rs232 routines can be used for the pic16f628 as well. Please note that these routines are for making a software USART in the pic. So the Tx pin is RB1 and the RX pin is RB0 of any pic device. Even the pic16f84 can be used here. And please check that you are using the max232 to connect to the TX-RX pins, i.e. RB0 and RB1 pins of the pic.

Share this post


Link to post
Share on other sites

Ah! Is THAT the problem. The way I have it set up at the moment uses pins 6 and 7 on the chip, which, iirc, are RB1 and RB2 respectively. I'll breadboard a different configuration up and try again. Thanks!

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 emoji 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  

×