Q & AVR MCU Series

Fact Sheet
Q: When using the AVR microcontroller started a new project, the most common and what common problems?
A most common mistake is to forget the most common hardware stack of chips with no means to set the stack for the AT90S8515 MCU is proper to do so on
LDI R16 low (RAMEND)
OUT SPL R16
LDI R16 high (RAMEND)
OUT SPH R16
Note in the assembly language source program ATMEL often registers R16 to replace the sign with the temp
Another common mistake is to use the port as output ports in the AVR microcontroller forget to set the port as output to use is by writing a 1 to the data direction register (DDR) set the port to complete the example, the output high PORTB
LDI R16 0xFF hexadecimal FF to load register R16
OUT DDRB R16 set the port to use PORTB as output
OUT PORTB R16 set the port output high PORTB
When using the AVR assembler third common mistake is to load the program memory in use (LPM) program memory instruction points to the wrong address in the AVR’s program memory is organized into 16 bit words in the form of the LPM instruction is 8bit LPM instruction bytes read 16-bit word can be read high byte or low byte of any one of the reasons for this program must be 16-bit memory address into two points to the byte you want to load Address

Q: I used back in the AT90ICEPRO (Trace options very difficult to feel like every time Why not start back function?
A: Let us assume that you stop the simulation at the address at 0x20 set to start if you are the trigger back function address is the same address that the program is then re-0x20 0x20 arrive back before the function is invalid because it is the trigger conditions and breakpoint information AVR should be loaded before the command so despite the nucleus of the trigger conditions of instructions and the address 0x20 is loaded but before that the instructions in the AVR core has no effect if you set the trigger conditions for a program that has not reached the address should not be any problems
Q: Mega103/603 which microcontroller pins used for on-line programming (ISP)?
A Mega103/603 microcontroller pin interface for online programming, such as the following
SCK – SCK (PB1 pin 11)
MISO – PDO (PE1 pin 3)
MOSI – PDI (PE0 pin 2)
RESET-RESET (RESET pin 20)
PEN (Program Enable) pin and RESET pin can select one of the two pins with the same features they are activated within the iRESET signal) but only in the PEN pin power (VCC about 1.2V) to be read PEN pin is not used to take if this pin is connected to VCC recommended for all other models are using the RESET pin AVR microcontroller to allow serial programming enabled
Q: I can not use the AVR emulator drive an external load correctly when I use the voltage meter to measure the pin on the emulator POD can not drive the load when the pin as if what is wrong?
A.

This is the 1.21 version and 1.10 version of the MegaICE ICEPRPO a problem that can be used to upgrade the new version of the emulator software available from site products-> AVR 8bit RISC-> software download page
To upgrade the version to 1.22 version ICEPRPO Download UPGRD122.ZIP file
To upgrade to the 1.11 version MegaICE Download M111UPGR.ZIP file
These files are compressed files that it includes a new emulator for the program file and a PC program code PC program can be used to automatically check and update the simulation
Q: I used with the A / D converter MCU AVR microcontroller work is very good I like the speed of AVR, but I have a problem when I change the A / D converter if the input channel A / D converter to read The data is still on a channel, if I read the second time I get the correct value Why does this matter?
A A / D control and status registers ADCSR there are two bits are used to detect A / D conversion end of the transition when a new start conversion start control bit ADSC is used to test the readiness of whether the previous conversion Results are still being sent to A / D data register when the read A / D data register read is still the natural result of the previous conversion
Conversion in order to get the latest test results should be A / D interrupt flag bit ADIF or enable global interrupt and read in the interrupt service routine
Sample Code
ldi R16 1 Select Channel
out ADMUX R16
sbi ADCSR adif reset interrupt flag
sbi ADCSR adsc start A / D conversion
wait sbis ADCSR adif ADIF is set to wait until
rjmp wait
Q: When a file into the AVR STUDIO always use when it is the first time I used the paper work what is wrong?
A AVD file contains information about window settings and the current target file information is sometimes created by the AVR STUDIO AVD files may be damaged depending on the file appears damaged in different parts of the different phenomena when running AVR STUDIO strange


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top