Blink an led connected with Atmega 328 microprocessor

Anything at least distantly related to MegaDrum

Blink an led connected with Atmega 328 microprocessor

Postby Meagan » Wed Dec 20, 2017 9:12 am

I wanted to blink an led every 1s connected with PORTB0 pin of Atmega 328p microprocessor. I have used USBASP programmer.The connection USBASP with 328p is like this: MOSI-17 MISO-18 SCK-19 RESET-1 GND-8 VCC-7 I have used a LM7805(http://www.kynix.com/Detail/800063/LM7805.html) to power the microprocessor from 9V battery,i have used two 1uF capacitor in input and output port of LM7805. I wanted to implement this code:
Image

Which should toggle LED at portb0 in every 1s.
But my led starts to glow for around 5s after the microprocessor has burnt and keeps glowing from then,it doesnt stop anytime after then.
the output window of atmelstudio 7 shows this:

Code: Select all
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e950f
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file "C:\Users\Rony\Documents\Atmel Studio\7.0\1st avr prog\1st avr prog\Debug\1st avr prog.hex"
avrdude.exe: writing flash (196 bytes):

Writing | ################################################## | 100% 0.14s

avrdude.exe: 196 bytes of flash written
avrdude.exe: verifying flash memory against C:\Users\Rony\Documents\Atmel Studio\7.0\1st avr prog\1st avr prog\Debug\1st avr prog.hex:
avrdude.exe: load data flash data from input file C:\Users\Rony\Documents\Atmel Studio\7.0\1st avr prog\1st avr prog\Debug\1st avr prog.hex:
avrdude.exe: input file C:\Users\Rony\Documents\Atmel Studio\7.0\1st avr prog\1st avr prog\Debug\1st avr prog.hex contains 196 bytes
avrdude.exe: reading on-chip flash data:

Reading | ################################################## | 100% 0.10s

avrdude.exe: verifying ...
avrdude.exe: 196 bytes of flash verified

avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.


WHAT IS THE PROBLEM?

I have used also used a external 16mhz clock,but still it shows ssame result.

One of my friend told me that in windows 10 I have to turn offf the device signate.I have turned off device signature and when I tried to update the driver again it shows that my driver is already up to date so it won't take a new driver.
Meagan
 
Posts: 2
Joined: Tue Apr 18, 2017 7:54 am

Return to Off topic

Who is online

Users browsing this forum: No registered users and 2 guests