cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

trying to set the rtc values using a struct like in the example and I get this when I try and enter values..

   

 

   

.\main.c: In function 'main':
.\main.c:30:17: error: invalid digit "9" in octal constant
     Start.Min = 09u;

   

it happens for all struct variables.. it only accepts digits 0-7 instead of decimals.

   

what did I do wrong? otherwise my digital clock using a neopixel ring works good 🙂 just have to code the time setting method using switches.

0 Likes
7 Replies
ETRO_SSN583
Esteemed Contributor

Can you post project so all of the affecting code can be examined -

   

 

   

Consider posting your project, makes life easier to troubleshoot.

   

 

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

 

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

will do and here ya are. its a minimum one.

0 Likes
ETRO_SSN583
Esteemed Contributor

I got only a couple of minor warnings, it compiled for me.....

   

 

   

Creator 3.2, SP1

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

even if you put a number higher than 7 in the start.sec or any of them?

0 Likes
Anonymous
Not applicable

C constant rules:

   

 

   

123 decimal constant

   

 

   

0123 octal constant

   

 

   

0x123 hex constant

   

 

   

Ed

0 Likes
Anonymous
Not applicable

ooooooh, now I see! I knew it had to be something I was doing wrong!

   

thanks much! now I can do it easier 🙂

0 Likes
Bob_Marlowe
Expert II

Ed,

   

Wow! well done. Since octal is so far away from my own thoughts it would never have come to my mind...

   

 

   

Bob

0 Likes