Questions tagged [avr]
AVR is a 8- and 32-bit microcontroller core developed by Atmel. AVR was chosen as microcontroller for the first generations of the popular Arduino SBCs.
1,909
questions
0
votes
1
answer
38
views
LCD Entry Mode Set and AVR MCU
I want to simulate **the Entry set mode ** function of and LCD based on HITACHI 44780 Controller.
(Here is the datasheet.)
The "Entry set mode" is given the following code of the 8 bits data ...
0
votes
1
answer
81
views
Analog switch for controlling LED
I need help/suggestions for the implementation of my schematic:
In the schematic image pasted below, particularly look only at the charging IC, boost converter, analog switch, and ATTiny 1616 ...
0
votes
0
answers
17
views
AVR128Dx TCB Input Capture issue
Ive made a code for reading SENT sensor using TCB interrupt with event system. It works 90% of the time, but those 10% seems like it doesnt read correct high pulse duration, mby someone will see, what ...
2
votes
1
answer
290
views
Memory view is showing multiple bytes change after a single byte is assigned to a register. Why?
I am debugging an issue I have on a legacy codebase that is running on an atxmega32c4u chip. I am writing single bytes to registers in PORTC, but the memory view is showing multiple bytes change. The ...
0
votes
1
answer
51
views
No touch points close to the edge of the screen
Just for fun and to learn, I'm writing code to drive a 800x480 TFT with resistive touch driven by an RA8875 and an ATmega328P and avr-libc.
It works fine so far but when reading touch events, I don't ...
0
votes
0
answers
25
views
Which ATtiny TWI parameter provides more robust operation?
I'm using an ATtiny3226 as an I2C client (slave) interface in a robot, to get commands from the main controller (single master) using I2C on a shielded cable.
There are brushless and servo motors ...
0
votes
1
answer
39
views
AVR assembly indirect addressing: "Found no label/variable/constant named …"
I am currently trying to indirectly address the SRAM of the ATMega328P by using the following code:
...
1
vote
0
answers
48
views
SSD1306 display goes out-of-sync only if ATmega328 is reprogrammed
I have ATmega328 directly connected to the SSD1306 Display through I2C. Whenever I power up the ATmega, everything works great and the display works as expected.
The problem occurs only when I upload ...
0
votes
0
answers
28
views
Problems with OCR1B on Atmega328p
Trying to control 4 servos (SG90) using 4 pots on an arduino nano and the one connected to OC1B keeps having problems, with bits of jittering and it just not moving correctly (occasionally spinning), ...
0
votes
1
answer
32
views
Why did fuse bits successfully reset using ICSP and USBASP programmer?
I read a lot about fuse bits in AVR microcontrollers and everyone says that fuse bits can be reset by using high-voltage programmer only, they can't be reset via UART<->ICSP.
So, I've received ...
0
votes
2
answers
68
views
Extended IO registers handling in AVR using Assembly language
I want to program the ADC module of arduino Mega2560 using Assembly language (for simulation and learning),
I can initialise the ADC Module using Assembly and my program converts in the first ...
1
vote
1
answer
47
views
Manipulating EEPROM in AVR using assembly programming
In the following video(at 10min):
https://www.youtube.com/watch?v=YELGX5XDCiY&list=PLgwJf8NK-2e55CdbY_WnY6pejPHoojCkJ&index=18
The microcontroller used in the video series is ATmega32.
Let's ...
1
vote
0
answers
47
views
SPI: Write to display while reading multiple blocks from SD card
I'm reading BMP images with hundreds of kB's raw from an SD card and parse/write the image data to a TFT LCD with an AVR MCU with 2kB RAM.
Reading a single block of 512 bytes with CMD17, passing it to ...
2
votes
3
answers
208
views
Tightest finite wait loop possible in AVR8
I need a wait delay function with fine grained control of the delay. I came up with the fairly standard way
ldi Rx, N
lp: dec Rx
brne lp
This ...
0
votes
2
answers
142
views
AVR ATmega328P if statement wrongly executed after reset
I have simplified the listing to bare minimum where I can still observe this behaviour.
When this program is running, it works as expected. Button press causes LED to show up.
The problem exist on ...