Commit e82c5e1e authored by anithghalley's avatar anithghalley
Browse files

embed update

parent bfd5034c
Pipeline #316851 passed with stage
in 1 minute and 8 seconds
......@@ -49,6 +49,61 @@ The image below shows the architecture of the AtTiny microcontrollor.
### Features in Attiny44.
- 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 byte of in-system programmable program memory flash (Atmel ATtiny24/44/84)
- Endurance: 10,000 write/erase cycles
- 128/256/512 bytes in-system programmable EEPROM (Atmel ATtiny24/44/84)
- Endurance: 100,000 write/erase cycles
- 128/256/512 bytes internal SRAM (Atmel ATtiny24/44/84)
- Programming lock for self-programming flash program and EEPROM data security
- Peripheral features
- Two Timer/Counters, 8- and 16-bit counters with two PWM channels on both
- 10-bit ADC
- Eight single-ended channels
- 12 differential ADC channel pairs with programmable gain (1x, 20x)
- Temperature measurement
- 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
- External and internal interrupt sources
- Pin change interrupt on 12 pins
- Low power idle, ADC noise reduction, standby and power-down modes
- Enhanced power-on reset circuit
- Programmable brown-out detection circuit
- Internal calibrated oscillator
- On-chip temperature sensor
- I/O and packages
- 14-pin SOIC, 20-pin QFN/MLF: Twelve programmable I/O lines
- Operating voltage:
- 2.7 - 5.5V for Atmel ATtiny24/44/84
- Speed grade
- Atmel ATtiny24/44/84: 0 - 8MHz at 2.7 - 5.5V, 0 - 16MHz at 4.5 - 5.5V
- Automotive temperature range
- Low power consumption
- Active mode:
- 1MHz, 2.7V: 800μA
- Power-down mod
- 27V: 2.0μA.
From the data sheet, its easier to understand the options available in the components and can even help in the programming part. From the data sheet we can know the number of ADC or comparators available. This chip offers 12 programmable pins. So I can easily select on for programmable LED.
## Board
During the [electronic design]( week, I designed an hello world board and I will be iusing the same board.
## Arduino As ISP.
During this session, we understood that the arduino board can also be used as a In-System Programmer too, so that we can program the hello world board. So to make the arduino board to function as a programmer. First of all we need to upload the ArduinoISP example code from file.
......@@ -61,8 +116,23 @@ Next work is to add the AtTiny board from board manager.
Based on the arduinos pinout the AVR isp pins goes in to the same type of pin arduino. Eg:
1. Vcc - 5V
2. Gnd - Gnd
3. SCK - SCK
6. RST - RST.
### Program code to test Input and Output.
Basically the switch is connected to pin 3 and the LED is connected to the pin 2 of the LED. When ever the switvh is pressed, the change of state will be detected and can be indicated using the LED.
In this assignent the code is either one blink or two blink which can be edited in the loop method.
int buttonState = 0; the board
void setup() {
......@@ -83,6 +153,12 @@ void loop() {
The below is programming the board using the arduino as ISP.
<video width="600" controls>
<source src="../../images/embedded_programming/videos/ardu.mp4" type="video/mp4">
## Using FabISP.
During the one of the week assignment, I fabricated the Brian FabISP, so that I will be able to program my board using the In-system programmer.
......@@ -93,7 +169,7 @@ I will be using the arduino IDE platform to program the hello world board. To up
### Programming with FabISP.
Select the board, programmer based on the hardware we will be using.
Select the board, programmer based on the hardware we will be using. I will be using the USBtiny programmer.
<video width="600" controls>
<source src="../../images/embedded_programming/videos/ISP.mp4" type="video/mp4">
......@@ -101,3 +177,4 @@ Select the board, programmer based on the hardware we will be using.
## Files.
- [code](../files/embeded/code_blink/code_blink.ino)
int buttonState = 0; the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(2, OUTPUT);
pinMode(3, INPUT);
// the loop function runs over and over again forever
void loop() {
buttonState = digitalRead(3);
if(buttonState == HIGH){
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
}// wait for a second
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment