various-hardware-projects

Public

aravinthpanch/various-hardware-projects

Download board files

Files for version 1. Choose the source project or an available generated package.

Share various-hardware-projects

Check access before sharing the link.

Who can open this board

Anyone can open this board. No sign-in is required.

This link opens the latest version. Copying it does not grant additional access.

Loading 3D model… large boards can take a moment.

README

ATMEGA8-16PU

Programming ATMEGA8-16PU with USBasp using AVRdude on OSX. Using USBasp AVR programmer from betemcu.cn to flash HEX into atmel and using the same to power up the atmel so that LED can be blinked. USBasp has 10 header female FPC connector at the end and the pins are mirrored positions of the male header. The connection with USBasp is not needed to be removed while developing the firmware as it supplies the +5V power needed for the atmel. ATMEGA8 is a 8 bit microcontroller and 16PU denotes just the packaging.

Wiring

USBasp Pin Connection

Components / Software

  • Atmel ATMEGA8-16PU
  • 470 Ohm Resistor
  • LED
  • Jumper Wires
  • USBasp AVR Programmer (Windows needs drivers installation)
  • Breadboard
  • AVRdude (Cross Compile Toolchain for AVR development)

Steps

  • Compile the blink.c source code to .obj by executing (replace atmega8 with your atmel microcontroller)
	avr-gcc -mmcu=atmega8 -Wall -Os -o blink.elf blink.c
  • Convert the .obj into Intel HEX by executing
	avr-objcopy -j .text -j .data -O ihex blink.elf blink.hex
  • Connect the USBasp into usb port of the host computer and execute. (replace m8 with your atmel microcontroller. Execute "avrdude -c usbasp" list all the compatible microcontroller with USBasp )
	avrdude -c usbasp -p m8 -e -U flash:w:blink.hex

Debug

  • Checking microcontroller USBasp connection by executing this outputs the below
    • avrdude -c usbasp -p m8
		avrdude: warning: cannot set sck period. please check for usbasp firmware update.
		avrdude: AVR device initialized and ready to accept instructions

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

		avrdude: Device signature = 0x1e9307

		avrdude: safemode: Fuses OK (H:FF, E:D9, L:E1)

		avrdude done.  Thank you.
  • Successful Flashing outputs this
		avrdude: warning: cannot set sck period. please check for usbasp firmware update.
		avrdude: AVR device initialized and ready to accept instructions

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

		avrdude: Device signature = 0x1e9307
		avrdude: erasing chip
		avrdude: warning: cannot set sck period. please check for usbasp firmware update.
		avrdude: reading input file "blink.hex"
		avrdude: input file blink.hex auto detected as Intel Hex
		avrdude: writing flash (90 bytes):

		Writing | ################################################## | 100% 0.07s

		avrdude: 90 bytes of flash written
		avrdude: verifying flash memory against blink.hex:
		avrdude: load data flash data from input file blink.hex:
		avrdude: input file blink.hex auto detected as Intel Hex
		avrdude: input file blink.hex contains 90 bytes
		avrdude: reading on-chip flash data:

		Reading | ################################################## | 100% 0.04s

		avrdude: verifying ...
		avrdude: 90 bytes of flash verified

		avrdude: safemode: Fuses OK (H:FF, E:D9, L:E1)

		avrdude done.  Thank you.
Comments

No comments yet. Be the first to ask about this board.

Askabout this board