Post Created date
can I ignore the following warning
AndreyT wrote: skotti wrote:works.   Formally, that's a violation of strict aliasing semantics. Today it "works", tomorrow it might stop working.   I read recently...
Saturday, 25 May 2019 - 00:42
longjmp() at the end of an ISR ? Or Goto+flag ?
skeeve wrote: BTW my recollection is that the way to handle register-trashing by longjmp is to call setjmp from a function that does nothing else but return the value....
Wednesday, 15 May 2019 - 18:10
Sampling rate + reconstruction question
I recommend that you watch (go to 3:36, the "stairsteps" chapter).   By the way, we can't even hear the difference between a 20kHz sine...
Tuesday, 7 May 2019 - 18:03
Help with USART Atmega328
clawson wrote:AFAIK most terminals will send all of 0x01 to 0x1A for Ctrl-A to Ctrl-Z. If you are lucky you'll even find Ctrl-@ can be used for 0x00 and Esc has generally always...
Tuesday, 9 April 2019 - 23:12
whats the best way to implement a not gate.
From what I understand after reading a datasheet on the 555, the minimum of 0.4V on RESET means your circuit needs to pull the voltage on that pin to below 0.4V to guarantee that...
Friday, 1 March 2019 - 23:57
whats the best way to implement a not gate.
avr-mike wrote: A recent project (still unfinished)-: needed a few inverters so I used a 74LS04 I had in the parts bin.  The project uses a mega328 to control some 555 timers...
Friday, 1 March 2019 - 22:41
Check if two #defines define same register
avr-mike wrote: Try taking the address of the ports: #if ((&PORTB) != (&PORTMyPin))This should remove the * dereference in the macros.   --Mike   The...
Friday, 24 August 2018 - 20:53
Problem in reading data from MPU6050 using I2C protocol
Ah, I see there's an issue with signed values. Take the last sample: z1=58 z2=-120 Acc_z=-120 It looks like I2C_Read_Ack() returns data as a signed 8-bit value and not an...
Tuesday, 17 July 2018 - 23:14
Problem in reading data from MPU6050 using I2C protocol
Acc_x = (((int)I2C_Read_Ack()<<8) | (int)I2C_Read_Ack()); The compiler doesn't guarantee that the two I2C_Read_Ack()s will be called in any particular order. Either the...
Tuesday, 17 July 2018 - 21:54
32768Hz Crystal... 100ms ticks possible?
If you just need a tick counter that increments at 10Hz, you can do something like this: volatile uint32_t tick; void isr_32768() { static uint16_t little_tick; little_tick...
Tuesday, 17 July 2018 - 21:39
Remove unused function warning for functions for #include files
theusch wrote:[How did Cliff deduce C++?] My guess is the "_Z3foov" in the listing. That's a C++ mangled name.
Wednesday, 11 July 2018 - 21:41
NaN macros not working correctly?
If the variable is uninitialized, anything goes. That's because using the value of an uninitialized variable is undefined behavior. The compiler can make any kind of...
Wednesday, 11 July 2018 - 20:32