Funduino VS ATTiny45


หลังจากได้เข้าเว็บของ MAKEZINE : http://blog.makezine.com/...projects.html
จึงเกิดคันไม้คันมือ อยากลองเล่นมั้ง หันไปเห็น เจ้าตัวน้อยของผม ATTiny45 ที่่ชื้อมาจาก ES (ของดองเค็ม)
ยิ่งทำให้ผมอยากเล่นไปกันใหญ่ 
........และแล้วก็ได้ลงมือซะที 11/11/2011 วันดีซะด้วย......   










Ref : http://hlt.media.mit.edu/?p=1229 
credit : http://www.electoday.com/...Funduino-vs-attiny45


อุปการณ์การเล่น
1. บอร์ด arduino compatible : mega168 หรือ mega328 ก็ได้
2. ATtiny45 ชื้อจาก es : http://www.es.co.th/detail.asp?Prod=06502016
3. breadboard
4. สาย jumper
5.  capacitor = 10 uF / 16 V
6. LED 3.5 mm
7. จอ Nokia 5110 : http://www.es.co.th/detail.asp?Prod=05905173


ขั้นตอนการเล่น
1. โปรแกรม ArduinoISP ไปยัง บอร์ด Arduino compatible
2. ต่อสาย jumper ตามนี้


board Arduino compatible    Pin        |                        ATtiny45   Pin
                 10                                 |                                 1
                 11                                 |                                 5
                 12                                 |                                 6
                 13                                 |                                 7
             
               Reset       ---------(+) 10uF/16V (-)  -------------   GND


3.ทดสอบโปรแกรม Basic -> bank แก้จาก pin 13 เป็น pin 0  
4. เปลี่ยนบอร์ด เป็น ATtiny45 (w/ Arduino as ISP)
5.แล้วกด Upload
จะขึ้น ข้อความแบบนี้


avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny45
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny45


เป็นอันใช้ได้


6. ทดสอบต่อ LED เลย จะได้ไฟกระพริบขั้นเทพแล้ว


ข้อดี คือ 
1. attiny45 ราคาถูก ตัว 27 บาท จาก es 
2. สามารถใช้งานที่ไฟแรงดันต่ำๆได้ ประมาณ 1.8-5.5 V
3. สามารถใช้ร่วมกับ โปรแกรม Arduino ได้
4. ไม่ต้องชื้อ เครื่องโปรแกรมเพิ่ม เพียงแค่มีบอร์ด arduino compatible ก็ใช้ได้แล้ว




ข้อเสีย


1.Arduino commands supported มีให้น้อย จึงไม่สามารถทำโครงงานเทียบเท่า บอร์ดarduino ได้


pinMode()
digitalWrite()
digitalRead()
analogRead()
analogWrite()
shiftOut()
pulseIn()
millis()
micros()
delay()
delayMicroseconds()


2.clock speed น้อย แค่ 1 Mhz จึงทำให้ประมวลผลช้า ถ้าเจอคำสั่งเยอะๆ 
3.เท่าที่ลองเล่นดู มีปัญหาเรื่อง timer ไม่เสถียน อาจเป็นเพราะ Arduino commands supported มั้ง
4. I/O น้อย




ขอให้สนุก กับคนอยากลองมั้งนะครับ