Post Created date
Creat delay function using count and loop
No matter which method you use, you will need to know what the system clock frequency is. The hardware counter AVR32_COUNT is incremented every clock cycle. You can reset it with...
Wednesday, 8 May 2019 - 17:24
SOLVED:unusual behaviour of if statement
Check if the DOR1 (Data Overrun Flag) in UCSR1A is set. You might be losing characters because your ISR has a a potential time-delay while(((UCSR1A&(1<<UDRE1))==0));
Friday, 19 April 2019 - 06:36
atmega 128 doesn't return from a function even if Extended.M103C fuse bit is disabled
Enabling an interrupt and not providing a handler is a time-proven method to generate frustration. Many modem-like devices will echo what they receive. From an ESP8266 datasheet...
Friday, 19 April 2019 - 06:13
atmega 128 doesn't return from a function even if Extended.M103C fuse bit is disabled
UCSR1B|=(1<<TXEN1)|(1<<RXEN1)|(1<<RXCIE1); enables the USART Rx Complete interrupt. Do you have a handler for that interrupt ?
Friday, 19 April 2019 - 05:16
Rounding ADC values properly, ATmega328p-PU
All the calculations are done with integers, therefore the x10 scaling of Vref is a way to get the tenths-of-volts. eg. with a Vref of 5.08, an input voltage of 3.969 V produces...
Saturday, 13 April 2019 - 23:55
Rounding ADC values properly, ATmega328p-PU
On the AVR8s, if Vin Vref then you need to scale it down (eg via a resistive divider on the input) to avoid damage and also to not saturate the ADC count, therefore 'your Vin' =...
Saturday, 13 April 2019 - 00:14
Atmega128 SPI Communication CPHA Change
In READ_register() you send 32 bits. Quote:7.5.1 Serial Interface ... The data packet (between falling and rising edge of STE) is 24 bits long and is serially shifted into SDIN...
Thursday, 4 April 2019 - 05:56
a proper way of entering library initialization parameters
Method 1 might result in smaller code size. My preference would be for something like ; uart_init( baud_rate, U_8DATABITS, U_NOPARITY, U_1STOPBIT ); because i can see at a...
Thursday, 4 April 2019 - 03:41
Atmega128 SPI Communication CPHA Change
Does IQ_mode_measure(); control the /STE input to the AFE4300 ?
Thursday, 4 April 2019 - 03:29
Idea: Code Review Groups?
A lot will depend on the egos of all the participants, ie. some reviewers might get upset if their inputs are not implemented and/or the target might discover that they have...
Wednesday, 3 April 2019 - 05:21
Nested interrupt
Answer = scenario 2. Scenario 3 will occur if your ISR takes too long to process a character. From the Reset and Interrupt Handling section in the datasheet Quote:When an...
Saturday, 30 March 2019 - 02:12
need help: timer0 intr service on mega328p
There is no interrupt handler for the Timer-Overflow interrupt TIMSK0 |= _BV(TOIE0); /* needed ? */ Yes, you will need to do sei(); /* enable...
Saturday, 16 March 2019 - 22:10