Post Created date
'large integer implicitly truncated to unsigned type' compiler warning when calculating baud rate
The truncation occurs on assignement to UBRRH and UBRRL. The correct code looks as follows: UBRRH = (uint8_t)(CALCULATED_BAUD >> 8); UBRRL = (uint8_t)CALCULATED_BAUD; 
Sunday, 29 October 2017 - 09:12
Advanced macro technology
C/C++ preprocessor can't do such things. You can create macro that takes argument Y and builds abcYdef, but you can't create macro that substitutes abcXdef with abcYdef.
Thursday, 26 October 2017 - 13:11
Contention between OCR1A and OCR1B on PWM
Derick22 wrote:Varying intensity of OCR1A or switching the respective pin as input somehow affects the intensity of OCR1B. Maybe the issue is outside the MCU? Verify operation of...
Thursday, 26 October 2017 - 12:11
Hint about communications: when it's worth to go with built-in Ethernet?
Now I understand what you meant writing "complete Ethernet-to-serial converter".
Thursday, 26 October 2017 - 11:51
Hint about communications: when it's worth to go with built-in Ethernet?
iw2nzm wrote:Wait, why would I change the code that uses UART if I will use Wiznet? They are not transparent replacements of serial lines on ethernet (like Moxa products) ? No, at...
Thursday, 26 October 2017 - 11:43
Hint about communications: when it's worth to go with built-in Ethernet?
iw2nzm wrote:Another point is I have well-tested code for xmega, UART bootloader and many useful routines that I must rewrite if I go with another brand. Are you going to change...
Thursday, 26 October 2017 - 11:24
Contention between OCR1A and OCR1B on PWM
Derick22 wrote:I just discovered the two peripherals ie ocr1a and ocr1b of timer1 cannot just be used simultaneously to output pwm on their respective pins of avr. The datasheet...
Thursday, 26 October 2017 - 10:26
Contention between OCR1A and OCR1B on PWM
1. Which microcontroller. 2. Show us the code.
Thursday, 26 October 2017 - 09:44
Software interrupt
GBaars wrote: A CALL will not set any, so how does RETI know which one to clear. I don't know, but I guess it uses simple algorithm like: if NMIEX is set // this is the flag...
Thursday, 26 October 2017 - 09:40
How to do a reset in Assembler?
Scroungre wrote:I fried half a dozen 32u4s before I found out that my "Five Volt" power supply was actually putting out more like six. I believe it was annoying. But I mean...
Thursday, 26 October 2017 - 06:24
Software interrupt
I guess one of HILVLEX, MEDLVLEX and LOLVEX bits in the PMIC.STATUS register is set on interrupt procedure enter and the same bit is cleared on RETI. When one of these flags...
Wednesday, 25 October 2017 - 22:31
Software interrupt
RETI in Xmega doesn't modify I flag in SREG. This is because there are three interrupt priorities in Xmega, so interrupts are handled in different way than in ATtiny/ATmega. I don...
Wednesday, 25 October 2017 - 15:35

Pages