Post Created date
C question -- init string without trailing null possible?
westfw wrote: I am disappointed that I can apparently not index quoted strings in initialization: char c = "mystring"[3]; Are you sure? I tried to compile this and there were...
Friday, 29 September 2017 - 07:08
CAN using Xmega
clawson wrote:Really? My day job is automotive and about the only reason any electronics in the car are not somehow connected to CAN is simply because their comms interface is on...
Thursday, 21 September 2017 - 11:12
Unable to set registers
And what about PRSPI? What if you remove sysclk_init() and/or board_init() calls from main()?
Wednesday, 20 September 2017 - 12:29
Unable to set registers
SleepyOak wrote:Could the problem be because of the software? should I try to reinstall atmel or perhaps use another computer? It is totally unlikely for me that this could help....
Wednesday, 20 September 2017 - 11:25
Unable to set registers
It is not a solution of the issue, but it is also worth to mention, that there should be SPCR = (1<<SPE)|(1<<MSTR)|(0<<SPR1)|(1<<SPR0)instead of SPCR = (...
Wednesday, 20 September 2017 - 08:42
How to handle invalid input in a function that returns a bool?
I don't like the solution with reference to the status variable because there is large overhead of code (both source and binary) required to handle it. I prefer one of the...
Friday, 8 September 2017 - 12:23
Odd behavior when decoding IR into uint32_t
awneil wrote: As explained in #3, the problem is due to sign extension -  so that won't happen if you use unsigned values, and won't happen when a larger value is truncated...
Wednesday, 6 September 2017 - 18:56
Odd behavior when decoding IR into uint32_t
The issue is the BIT_SET macro definition. The value 1 used in the macro is 16-bit signed integer. The result of 1<<(b) is also 16-bit signed integer and it is implicitly...
Wednesday, 6 September 2017 - 06:46
while loop not checking while(OK_S!=1)
Precedence of the != operator is higher than of the & (bitwise and) operator. So your while (OK_S != 1)which after preprocessing is while (PINC & (1 << 6) != 1)...
Tuesday, 29 August 2017 - 06:42
What does this enum do?
Regarding the 'typedef', it allows you to use such variable declaration in C:   AppStates_t v;  Without the 'typedef' you would write:   enum AppStates_e {...
Monday, 9 January 2017 - 10:28
If Condition problem with pin initialisation
1. The conditions in the if-s are always true because you use OR and assignment operator (|=) and I guess AND operator (&) should be used assuming that you want to test the...
Wednesday, 28 September 2016 - 09:32
Attiny84 does not enter interrupt
Did you try LED of another color? Blue LED-s have high voltage drop. Maybe your code works correctly, but the LED current is so low so you can't see its light. What is Vcc value?...
Tuesday, 26 April 2016 - 06:23