Compare the performance and development workflows for different microcontroller families.
Document your work (in a group or individually).
Individual Assignment:
Read the datasheet for the microcontroller you are programming.
Program the board you have made to do something, with as many different programming languages and programming environments as possible.
Learning Outcomes:
Identify relevant information in a microcontroller datasheet.
Implement programming protocols.
Steps in General:
Step(1): Comparing the performance and development workflows for different microcontroller families.
Step(2): Reading the ATtiny44 Datasheet.
Step(3): Programing the board using Arduino C.
Step(4): Burning the code using AVRDUDESS.
Step(5): Programming the board using C Language
Steps in Details:
Step(1): Comparing the performance and development workflows for different microcontroller families.
In this assignment we compared the performance between the ATtiny44, ATtiny85 and Arduino Uno board.
We used the Arduino IDE for C and Arduino C programming and display the frequency on the oscilliscope.
Documentation of these comparision in our here group assignment page.
Step(2): Reading the ATtiny44 Datasheet.
Datasheet is a document which includes the technical specifications and performance of a component, material or system to be used by designers/developpers to be able to operate the component/system and intergare it with other subsystems.
I selected the ATtiny44 to read and explore its datasheet and made a summary of the main features and specs as follows:
High Performance, Low Power AVR® 8-Bit Microcontroller.
Advanced RISC Architecture:
120 Powerful Instructions – Most Single Clock Cycle Execution.
32 x 8 General Purpose Working Registers.
Fully Static Operation.
Non-Volatile Program and Data Memories:
2/4/8K Bytes of In-System Programmable Program Memory Flash.
128/256/512 Bytes of In-System Programmable EEPROM.
128/256/512 Bytes of Internal SRAM.
Data Retention: 20 years at 85°C / 100 years at 25°C.
Programming Lock for Self-Programming Flash & EEPROM Data Security.
Operating Voltage:
1.8 – 5.5V for ATtiny24V/44V/84V.
2.7 – 5.5V for ATtiny24/44/84.
I/O and Packages:
Available in 20-Pin QFN/MLF & 14-Pin SOIC and PDIP.
Twelve Programmable I/O Lines.
Peripheral Features:
One 8-Bit and One 16-Bit Timer/Counter with Two PWM Channels, Each.
Programmable Watchdog Timer with Separate On-chip Oscillator.
On-chip Analog Comparator.
Universal Serial Interface.
Special Microcontroller Features:
debugWIRE On-chip Debug System.
In-System Programmable via SPI Port.
Internal and External Interrupt Sources: Pin Change Interrupt on 12 Pins.
Programmable Brown-out Detection Circuit.
Internal Calibrated Oscillator.
On-chip Temperature Sensor.
Pin Configurations:
VCC: Supply voltage.
GND: Ground.
Port B (PB3:PB0):
Port B is a 4-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability except PB3 which has the RESET capability. To use pin PB3 as an I/O pin, instead of
RESET pin, program (‘0’) RSTDISBL fuse. As inputs, Port B pins that are externally pulled low
will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running.
RESET: Reset input. A low level on this pin for longer than the minimum pulse length will generate a
reset, even if the clock is not running and provided the reset pin has not been disabled. The minimum pulse length is given in Table 20-4 on page 177. Shorter pulses are not guaranteed to
generate a reset.
The reset pin can also be used as a (weak) I/O pin.
Port A (PA7:PA0): Port A is a 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port A output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port A pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port A pins are tri-stated when a reset condition becomes active,
even if the clock is not running
Block Diagram of Internal Structure:
ATtiny24/44/84 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC
architecture. By executing powerful instructions in a single clock cycle, the ATtiny24/44/84
achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize
power consumption versus processing speed.
Step(3): Programing the board using Arduino IDE:
I connected the board (that I made in the electronics production week) to my laptop through the USBasp.
I opened the Arduino IDE, Opened File > Preferences and pasted this URL "https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json" into the Additional Boards Manager URLs and pressed OK
Opened Tools > Board > Boards Manager and searched for attiny by David A. Mellis and installed it.
From Tools, I selected the ATtiny 44 as the used board.
Set the processor to ATtiny44, Clock to External 20 MHz, selected the used port, Programmer to USBasp.
The input for the board is the Push Button and the output is the LED. so I made a code in which when the button is pressed the led will turn off and when it released the turn will turn on.
Step(4): Burning the code using AVRDUDESS.
From the Arduino IDE, I selected Sketch > Export compiled binary, to obtain the .hex file
I downloaded and installed the AVRDUDESS and pressed the Detect button and it recognized my board (as ATtiny44A)
I selected the button.hex file and uploaded it on AVRDUDESS and the pressed Go
Now the code is burnt and runs well.
Step(5): Programming the board using C Language
I wrote a code in C language when the button is pressed, the led turns on for 1 sec.
I compiled the sketch and uploaded it to my board and it worked very well.
Finally, I have:
√ Linked to the group assignment page.
√ Documented what I learned from reading a microcontroller datasheet.