Microcontroller › AVR › How could these program compiled?
- This topic has 16 replies, 3 voices, and was last updated 11 years, 3 months ago by
Amrith.
-
AuthorPosts
-
June 21, 2012 at 3:08 pm #1851
Ghulam Mustafa
Participanthello,
I am new to AVR, pls inform me how could the programs code given on your website could be compiled and how could their hex file be generated.
If any tutorial of this is present pls also give its link
thanks
June 21, 2012 at 4:18 pm #8107Amrith
ParticipantHello Mustafa,
Use AVRStudio4 for compiling the code given on Engineer garage for AVR microcontroller. Google AVRStudio4 user guide for tutorial & procedures.
June 22, 2012 at 2:57 pm #8113Ghulam Mustafa
ParticipantThanks alot
I have programmed the AVR, http://www.engineersgarage.com/embedded/avr-microcontroller-projects/adc-circuit but LED’s are flashing continously, while when i switch them to Gnd all are Off, and when Vcc is supplied all are High.
While when connected to Pot, they flash with different values.
What might be the problem now?
June 22, 2012 at 3:10 pm #8114Ghulam Mustafa
ParticipantThanks alot,
I compiled and burn the program on the chip, i am facing a problem that the LED present at the output are continously blinking if i provide some voltage on the adc pin, otherwise if i connect this pin to VCC or GND, they are continously high or low.
Pls guide what could be the problem now.
Thanks again
June 23, 2012 at 12:51 am #8117AJISH ALFRED
ParticipantHi Ghulam,
I think there is some issues with the reference voltage to the ADC. Have you connected the pin32 (adc reference) to VCC as shown in the circuit?
Well, try this also. Remove the capacitor and directly connect the reference pin to VCC.
June 27, 2012 at 1:41 pm #8132Ghulam Mustafa
ParticipantI tried it all but the program is not running. Also when i simulated the circuit in Proteus it is working correctly, while not on the bread board.
Also another simple circuit has the same problem
Pls guide what migt be the problem and how it could be resolved.
Thanks
June 27, 2012 at 3:18 pm #8136Amrith
ParticipantHi Gulam,
1. what external oscillator you are using. Kindly mention.
2. Give the capacitors values used at external oscillator.
3. check with your harware connections, if possible share your schemtic to verify.
June 27, 2012 at 4:10 pm #8137Ghulam Mustafa
Participantwysiwyg_imageupload:5162:Hello,
I am using the following cofiguration for the atmega16 controller.
I think that the last reason may be this issue.
Kindly check and inform if this is the main issue.
Thanks
June 27, 2012 at 4:15 pm #8138Ghulam Mustafa
ParticipantHello Amrith
Thanks for replying, i have mentioned the link which i am following to develop the circuit. Actually i doesnt contain any external oscillator.
Thanks
June 27, 2012 at 5:15 pm #8139Amrith
ParticipantHi Ghulam,
I have gone through the link mentioned by you, i think external oscillator is missing in the circuit between pin no. 12 & 13 & there is no internal oscillator enabled in the code. Suggest you to put an oscillator with value 8Mhz and try.
June 27, 2012 at 5:15 pm #8140Amrith
ParticipantPlease correct me if i’m wrong any where.
June 27, 2012 at 5:50 pm #8141Ghulam Mustafa
ParticipantThanks very much
Two thinks to ask before implementing.
1- this program was simulated on Proteus and was running well without the oscillator
2- Is there any prblem in the fuse bits
Pls reply so that i may implement it now
June 28, 2012 at 9:36 pm #8148Ghulam Mustafa
ParticipantI have added 4Mhz crystal now, but still facing the same error.
I have tried some other program which is running correctly.
So the problem, i think is in the code. http://www.engineersgarage.com/embedded/avr-microcontroller-projects/adc-circuit
Kindly check it and inform me, why the ports are continously blinking.
Thanks
June 28, 2012 at 9:55 pm #8149Ghulam Mustafa
Participanti think that the coder has send all the 10 bits to port b this is the reason that the port is flashing. What do you ppl think?
June 29, 2012 at 12:04 pm #8151Ghulam Mustafa
ParticipantAn important observation:
When the input voltages are less than 2V this error doesnt occour!
-
AuthorPosts
- You must be logged in to reply to this topic.