Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Warning: Microchip's printf() Picky (http://www.chiefdelphi.com/forums/showthread.php?t=34301)

Astronouth7303 09-02-2005 21:50

Warning: Microchip's printf() Picky
 
I found tonight that when using Microchip's printf(), and the format string does not end in "\r", then it may cause the green-orange blinking on the program LED on the controller.

Make sure all your calls end their lines correctly.

Tom Bottiglieri 09-02-2005 21:54

Re: Warning: Microchip's printf() Picky
 
Quote:

Originally Posted by Astronouth7303
I found tonight that when using Microchip's printf(), and the format string does not end in "\r", then it may cause the green-orange blinking on the program LED on the controller.

Make sure all your calls end their lines correctly.

If this is true.. I think you saved me hours of frustration.

I was getting a blinky blinky code state light, and I think its because i had /n instead of /r .

Did you run into this problem or something similar?

Ryan Cumings 09-02-2005 22:11

Re: Warning: Microchip's printf() Picky
 
Quote:

Originally Posted by Astronouth7303
I found tonight that when using Microchip's printf(), and the format string does not end in "\r", then it may cause the green-orange blinking on the program LED on the controller.

Make sure all your calls end their lines correctly.

I found that out when I re-used some code from last year.. Does anyone know why they changed it?

Joe Ross 10-02-2005 15:21

Re: Warning: Microchip's printf() Picky
 
Quote:

Originally Posted by Ryan Cumings
I found that out when I re-used some code from last year.. Does anyone know why they changed it?

You can use IFI's printf if you like. It's still included with both versions of the default code. The difference now is that you can choose to use IFI's or Microchip's.

probizzle 13-02-2005 19:26

Re: Warning: Microchip's printf() Picky
 
Also,

make SURE no stray printfs are being calling before Initialize_Serial_Comms() is called.

If you do this, your rc will go into red-green led mode every time you reset it. So you'll have to end up downloading your code ALL the time.
(I'm assuming ifi-loader will do these initializations for you the time you are downloading code, and as this won't happen later, you get the crash. dunno though.)

probizzle 13-02-2005 19:27

Re: Warning: Microchip's printf() Picky
 
Also,

make SURE no stray printfs are being called before Initialize_Serial_Comms() is called.

If you do this, your rc will go into red-green led mode every time you reset it. So you'll have to end up downloading your code ALL the time.
(I'm assuming ifi-loader will do these initializations for you the time you are downloading code, and as this won't happen later, you get the crash. dunno though, someone wanna check?)


All times are GMT -5. The time now is 08:43.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi