View unanswered posts | View active topics It is currently Wed Jul 30, 2014 3:14 pm






Reply to topic  [ 3 posts ] 
Serial sample programs cannot be debugged 
Author Message
Rookie

Joined: Mon May 14, 2012 3:24 pm
Posts: 43
Post Serial sample programs cannot be debugged
Just a warning for anyone trying the sample programs with the UNO that the programs in the Serial directory cannot be debugged. In addition once you install them you will get an error from RobotC that the Arduino is no longer visible on the com port.

Don't panic :D You can get RobotC to recognize the Uno again by re-downloading the firmware.

Anyone who has messed with the serial pins digital 0 & 1 knows how they conflicts with the USB Serial port (on mega you have more Serial pins to mess with).

I wonder if we will see a SoftSerial library on RobotC anytime soon?


Mon May 14, 2012 4:31 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 601
Post Re: Serial sample programs cannot be debugged
A Software Serial Library is in our "future plans" for sure. As in the "PulseIn" functionality as well. I believe the Arduino can do 4.8kbps or 9.6kpbs pretty reliably in software.

As for a temporary work around, you can put a delay at the beginning of your code and then have the serial port change from a system port to a user controlled port. You'll just have to remember to press the reset button before you download your changes!

Code:
task main()
{

   wait1Msec(5000);
   
   configureSerialPort(UART0, uartUserControl);
   setBaudRate(UART0, baudRate9600);
   
   while(true)
   {
    sendChar(UART0,'A');
    wait1Msec(500);
   }
}

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Tue May 15, 2012 9:14 am
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: Serial sample programs cannot be debugged
tfriez wrote:
As for a temporary work around, you can put a delay at the beginning of your code and then have the serial port change from a system port to a user controlled port. You'll just have to remember to press the reset button before you download your changes!


Phew! One of my first projects was going to use serial! I was hoping that I wouldn't have to re-download the firmware after every test..... Thanks, tfriez!

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Tue May 15, 2012 9:18 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.