Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SOLVED C syntax question - show version #

Status
Not open for further replies.

AlGeorge

Member level 1
Joined
Nov 17, 2009
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Waihi Beach
Activity points
1,606
UPDATE I've fixed it below but decided not to use it after all!
Hi I wanted to do a wee hardware versioning trick - compiles OK but my numerics are not being resolved. Chip PIC10F - am getting nothing from the version field, which according to my cc5x info should be being stored in program memory. Anyone advise what I'm doing wrong here?
I'll post the good code

Code:
//Version date
const char version[]={14,01,10}; //date 14/1/2010
#ifdef manualbatteryinsert
x=0;
if (awake==0)
do
{
z=version[x]; //numeric date value
for(y=0;y<z;y++)
{
leddrive(GREENled,20); //display numerics by flash
delay10(30);
}
++x;
if (x==sizeof(version)) break;
leddrive(REDled,20); //indicates break between fields
delay10(50);
}
while(1);  
#endif
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top