Only SPI modes 0 and 1 supported by Attiny84 USI? On re-checking it seems that, whatever mode it is called,: the mode that starts with clock low and samples data on the first rising edge is compatible with both SPI and USI and...
running different interrupt code based on a flag Also you should show your power-up initialization code where you need to configure pins PD2 and PD3 to be INT0 and INT1 and enable them as pin change interrupts. I am thinking...
Thursday, 17 October 2019 - 02:19
running different interrupt code based on a flag You do an SEI to permit further interrupts. You don't need to do this if you do a RETI which I believe C adds to the end of ISRs automatically. But where is your code going back...
Thursday, 17 October 2019 - 01:55
Only SPI modes 0 and 1 supported by Attiny84 USI? I have an ATTINY861 with USI hung on an ATMEGA1284's SPI buss with a bunch of other things. I am concerned that USI is NOT compatible with SPI in either mode 1 or 0.
Look at...
The comment about print statements in your code slowing it down "significantly" is an understatement. It will kill it!
On re-checking it seems that, whatever mode it is called,: the mode that starts with clock low and samples data on the first rising edge is compatible with both SPI and USI and...
I have heard that the human eye optic nerves are "peak hold" so an LED display is almost as bright if pulsed with a duty factor less than 100%
Unless it's really hard, replace the darn $2 chip and save yourself hours
Also you should show your power-up initialization code where you need to configure pins PD2 and PD3 to be INT0 and INT1 and enable them as pin change interrupts. I am thinking...
You do an SEI to permit further interrupts. You don't need to do this if you do a RETI which I believe C adds to the end of ISRs automatically. But where is your code going back...
I have an ATTINY861 with USI hung on an ATMEGA1284's SPI buss with a bunch of other things. I am concerned that USI is NOT compatible with SPI in either mode 1 or 0. Look at...
Thanks I will try optimization settings. I like your UNION formulation best though.
Actually FORTRAN would not be guaranteed to let you offset the base as it generally forces 4byte quantities to be located on 4 byte boundaries and 16 bit quantities to be located...
result = (PINB << 8) | PIND; That compiled way more efficiently for you than me. I was using GCC C to compile to an ATMEGA1284. It compiled to doing the 8 shifts one at a...
OK you have helped me understand UNION. It likely is the same as FORTRAN equivalence. I was concerned with what 'join' and 'joined' would compile to but I see now that they are...
In FORTRAN you would just write INTEGER*16 WORD BYTE BYTES(2) EQUIVALENCE ( BYTES, WORD) Thereafter you can just address the same RAM 16 bits st a time using WORD or byte at...
Pages