Post Created date
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
Issues with memcpy on SAML21
Did you mean to use memset rather than memcpy? Otherwise you're copying data from address 0, which is probably not what you want.
Tuesday, 12 June 2018 - 23:28
will using eeprom_update_block be more efficient?
clawson wrote: Well two things:   1) If you are going to perist over versions do it like this: typedef struct { int width; int height; uint8_t rate; uint8_t...
Wednesday, 23 May 2018 - 17:09
SAMD21G18 - Bug in MUL instruction? Extensive testing indicates hardware.
Maybe I'm missing something, but if you want to multiply two 32-bit signed values to get a 64-bit signed value, shouldn't $FFFFFFFF multiplied by $FFFFFFFF give you $...
Friday, 6 April 2018 - 23:34

Pages