week8
Home |
Weekly assignments |
Final project
week8
*assignment
--individual assignment:
read a microcontroller data sheet
program your board to do something,
with as many different programming languages
and programming environments as possible
--group assignment:
compare the performance and development workflows
for other architectures
1.Learning from datasheet
I tried so many times to understand this datasheet.
But it was really difficult for me
Because I've never studied this kind of things.
Though actually any other parts in fabacademy were also new to me.
But I think it's the most toughest part I've ever learned until now.
So I refered to websites of other students(Rodrigo, Kurina , Hyejin from Fablab Seoul in Fabacademy 2017)
*important conceptions
-SPI: Serial Peripheral interface (used in Atmel for inputting and reading program or data)
-MOSI: Master Output, Slave Input (output from master) --> to give output
-MISO: Master Inout, Slave Output (output from slave) -->to accept input
-SCK: Serial Clock(Clock means special signal to get programs activate)
-ADC: Analog to digital converter (translating analog value to digital value)
-AVCC: The Analog Supply Voltage pin for Port F and the A/D converter.
-AREF: Voltage Reference that the chip will use to know the range of voltage.(Pin which is the standard for analog VCC)
-PDIP/SOIC : PDIP(Dual in-line package, through hole package), SOIC(Small-outLine integrated circuit)
-EEPROM (128/256/512 Bytes of In-System Programmable EEPROM) : Electrically Erasable Programmable Read-Only Memory, Non-volatile memory.
used in computers and other electronic devices to store small amounts of data that must be saved when power is removed
Actually just the words(on Rodrigo website) were not enough for me to understand perfectly.
So I searched these conceptions on Naver(Korean portal).
It was really helpful.
I added somewhat until I understood.
Programming
1.Learning basics of Arduino
Yeah!! I think around this time you might know I don't have any knowledge of this!! jhhhhhhh.
So I had no choice but to learn at first.
I studied Arduino via youtube.(This is the lecture I learned from. )
Honestly I should've studied more. Because I don't have enough Arduino skills to make my final something.
Next week is break. So I should study Arduino more.
2.Programming
1)My Arduino Code
int led =7;
int button =3;
void setup(){
pinMode(led, OUTPUT);
pinMode(button, INPUT);
}
void loop(){
if(digitalRead(button) == LOW{
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
}
This is my code. YEAH.... it's really quite easy.
So next time I'll be using more complicated and useful fuction.
2)Problem and Solving
Other settings already done in week6.
I just added 'if' code more.
And then I tried to complie at first.
Something not happened. It was okay.
But when I tried to uploade, I failed....
The error message is "Double check connections and try again or use f to override"
So I searched on Google.
This is the solution from Arduino official website.
I thought I've already done well in my soldering.
So I tried with Source Code.
I downloaded and upgraded sourcecode.
But I got the same error message.
I don't remember exactly but I saw Arduino version is important.
So this time I approached to the problem with lowversion.
But fail again.
So I gave up to make it on my own.
I asked my instructor the day after.
Seeing my problem, Rodrigo checked my board.
And he found what had made the problem.
What is the reason?
That part(blue sketched) was not soldered.
I had soldered it but after ISP programming when I tried 'rstdisbl'code, I saw 'desolder' on the webpage, so I desoldered that part.
So that made the problem.
Success
At this time, when I uploaded, it worked.
This was the first time I saw the 'done' meassage....!!!
3.Result
VIDEO
It worked well~.
Downloads
Arduino code ino file
2.Fabkit
Materials
1 Atmega 168
1 Crystal 8 MHz (resonator)
1 Capacitor 10 uF
2 Capacitor 0.1 uF
1 Capacitor 1 uF
1 Resistor 10 K
1 Resistor 499 ohm
1 Led
1 FTDI 3.3-5V
1 8 male pin connector
2 8 female pin connector
1 button SMD
Files
trace
hole
outline
Making connection part to ISP
I got fabkit after milling and soldering.
I had one thing left.
I needed to make connection header and pins to connect ISP and fabkit.
I had to compare attiny168 components and fab isp.
So I found the right direction.
First before doing that, I made the connection pins and header.
That is the right connetion.
Fabkit:RST,MOSI,MISO,SCK,GND,VCC.
ISP:MISO,VCC,SCK,MOSI,RST,GND.
Both orders are only for that direction(on the picture).
Programming
code
const int ledPin = 13;
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
setting
You should remeber! using 'arduino pro or pro mini' as board.
And then Atmega168(3.3v, 8mhz)-(It's for ur the kind of attiny)
Result
VIDEO
Done!!!!!!
Download
fabkit.ino file
Home |
Weekly assignments |
Final project