บทความประกอบการเรียนรู้ => ไมโครคอนโทรลเลอร์ (MCS51) => ข้อความที่เริ่มโดย: admin ที่ พฤศจิกายน 18, 2009, 12:12:43 PM

หัวข้อ: งานครั้งที่ 4 การประกอบวงจรขับ LED แบบขนาน 8 ตัว
เริ่มหัวข้อโดย: admin ที่ พฤศจิกายน 18, 2009, 12:12:43 PM
ประกอบวงจรขับ LED 8 ตัวแบบขนานผ่านทางพอร์ต 0 ใช้แผ่นวงจรพิมพ์เอนกประสงค์แผ่นใหม่
(คอนเนกเตอร์ต้องจัดวางให้ตรงกับแผ่นวงจรไมโครคอนโทรลเลอร์)
(http://image.free.in.th/v/2013/ip/lab7.4-sch-pcb.png)

วงจรเมื่อใช้งานจริง
(http://image.free.in.th/v/2013/ik/lab7.4-sch.png)


เมื่อใช้งานให้นำวงจรไมโครคอนโทรลเลอร์มาประกอบเข้ากับวงจรต่อพ่วงดังรูป
(http://image.free.in.th/v/2013/io/lab7.4-pcb.png)

http://www.praphas.com/index.php?option=com_content&view=article&id=51:-mcu-3-output-port&catid=34:mcu&Itemid=53 (http://www.praphas.com/index.php?option=com_content&view=article&id=51:-mcu-3-output-port&catid=34:mcu&Itemid=53)
หัวข้อ: Re: วงจรใบงานที่ 1
เริ่มหัวข้อโดย: admin ที่ พฤศจิกายน 18, 2009, 01:50:59 PM
IC 74HC573
(http://www.es.co.th/Picture/PDIP-20.jpg)
http://www.es.co.th/detail.asp?Prod=08601816 (http://www.es.co.th/detail.asp?Prod=08601816)

Socket 20 pin
(http://www.es.co.th/Picture/ISSXXT1.jpg)
http://www.es.co.th/detail.asp?Prod=00711406 (http://www.es.co.th/detail.asp?Prod=00711406)

LED 3mm
(http://www.es.co.th/Picture/N-LED3-RD.jpg)
http://www.es.co.th/detail.asp?Prod=01002251 (http://www.es.co.th/detail.asp?Prod=01002251)

Female Header
(http://www.es.co.th/Picture/FHDSxxG11.jpg)
(2x2)
http://www.es.co.th/detail.asp?Prod=00704330 (http://www.es.co.th/detail.asp?Prod=00704330)
(2x8)
http://www.es.co.th/detail.asp?Prod=00704301 (http://www.es.co.th/detail.asp?Prod=00704301)


หัวข้อ: Re: งานครั้งที่ 4 การประกอบวงจรและเขียนโปรแกรมควบคุม LED แบบขนาน
เริ่มหัวข้อโดย: admin ที่ ธันวาคม 30, 2010, 10:28:24 AM
ตัวอย่างโค้ด
โค๊ด: [Select]
#include<reg52.h>
void delay(int count);
void main(void)
{
int n;
code unsigned char value[]={0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFC,0xFE,
0xFF,0x7F,0x3F,0x1F,0x0F,0x07,0x03,0x01};
while(1)
{
for(n=0;n<16;n++)
{
P0=value[n];
delay(100);
}
}
}
void delay(int count)
{
int x,y;
for(x=0;x<count;x++)
{
for(y=0;y<500;y++)
{
}
}
}

หัวข้อ: Re: งานครั้งที่ 4 การประกอบวงจรและเขียนโปรแกรมควบคุม LED แบบขนาน
เริ่มหัวข้อโดย: admin ที่ ธันวาคม 30, 2010, 08:12:54 PM
การใช้ Excel สร้างโค้ดรูปแบบไฟวิ่ง
(http://www.praphas.com/PhotoForum/MCS/lab4/pattern-led-excel.png)