Comments
Description
Transcript
8×8LED マトリクスを用いた電光掲示板教材の開発
ႎ๔ 8×8LED ࡑ࠻ࠢࠬࠍ↪ߚ㔚శឝ␜᧼ᢎ᧚ߩ㐿⊒ߣߘߩᵴ↪ ⪲ጊ ᷡノ㧖 Development and utilization of educational material of the electrical display using 8×8 matrix LED Kiyoteru Hayama㧖 Hobby electronics is a good opportunity to learn information, communication and electronics engineering. In this study, the electrical display using 8×8 matrix LED is developed for educational material. Additional board for expansion of the display area is also developed. The display is utilized for the subject of our open campus, public lecture etc. ࠠࡢ࠼㧦.'& ࡑ࠻ࠢࠬ㧘㔚శឝ␜᧼㧘#84 ࡑࠗࠦࡦ Keywords㧦LED matrix, display, AVR 㧝㧚ߪߓߦ ᢥሼ߇Ꮐ߆ࠄฝߦᵹࠇߥ߇ࠄജߒߚᢥሼ߇␜ߐࠇ 㔚ሶᎿߪ㔚ሶᖱႎ♽ߩᛛⴚࠍりㄭߦᗵߓߡ߽ࠄ߃ࠆᯏ ࠆࠃ߁ߦߥߞߡࠆ㧚ᦨᄢ 25 ᢥሼߢછᗧߩᢥሼࠍ 4 ߟࠬ ળߢࠅ㧘ᧄᩞߩࠝࡊࡦࠠࡖࡦࡄࠬ㧘㐿⻠ᐳ㧘೨ ࠗ࠶࠴ࠍߞߡജߢ߈ࠆ㧚න 3 ဳੇ㔚ᳰ 2 ᧄߢേน⢻ ᬺߢ߽ࠃߊⴕࠊࠇߡࠆ㧚ଔߢ⍴ᤨ㑆ߦᎿߢ߈ታ↪ᕈ ߢࠆ㧚 ߢߩ㕙⊕ߐߩࠆ㔚ሶᎿߩ㗴᧚ߣߒߡ 8×8LED ࡑ࠻ࠢ ࠬࠍ↪ߚ㔚శឝ␜᧼㧔એਅ㧘㔚శឝ␜᧼㧕ߩࠠ࠶࠻ࠍ㐿 ᠲᣇᴺߩ⺑ ⊒ߒ㧘ߘߩᔕ↪ߦߟߡ߽ᬌ⸛ߒߚ㧚ታ㓙ߦࠝࡊࡦࠠࡖ ࡦࡄࠬ╬ߢᵴ↪ߒߚ߽ႎ๔ߔࠆ㧚 ࠬࠗ࠶࠴ߩ߈ߪ㧘એਅߩࠃ߁ߦഀࠅᒰߡߡࠆ㧚 ฝࠬࠗ࠶࠴㧦ᰴߩᢥሼ߳㧘 2 ⑽㐳ߒߢࡕ࠼ಾᦧ㧔ജ ࡕ࠼ߣ␜ࡕ࠼㧕 㧚 㧞㧚㔚శឝ␜᧼ߩ㐿⊒ Ꮐࠬࠗ࠶࠴㧦೨ߩᢥሼ߳㧘2 ⑽㐳ߒߢࡔࡕᶖ㧘ᦝߦ 2 ⷐ ⑽㐳ߒߢ࠺ࡕ(ߩޠࠎߖ߁ߎߣ߽߹ߊޟᢥሼ)ࠍ␜㧚 ࿑ 1 ߦ㐿⊒ߒߚ 8×8LED ࡑ࠻ࠢࠬࠍ↪ߚ㔚శឝ␜᧼ ਅࠬࠗ࠶࠴㧦50 㖸㗅ߦᢥሼࠍㅍࠆ㧘ᦨᓟߦⓨ⊕㧘Ộὐߥߤ㧚 㐳ߒߢ⥄േㅍࠅ㧚 ࠍ␜ߔ㧚 ࠬࠗ࠶࠴㧦50 㖸ߩㅒ㗅ߦᢥሼࠍᚯߔ㧘㐳ߒน⢻ ᠲᚻ㗅ࠍએਅߦ⸥ߔ㧚 1㧕Ꮐࠬࠗ࠶࠴ࠍ㐳ߒߒߡࡔࡕࠍᶖߒ㧘␜ࠍޠޟ ߐߖࠆ㧚 2㧕ਅࠬࠗ࠶࠴ߢജߒߚᢥሼࠍㆬ߱㧚 3㧕ฝࠬࠗ࠶࠴ࠍߔߣⓨ⊕ߦߥࠆߩߢᰴߦജߒߚᢥሼ ࠍㆬ߱㧚 4㧕ห᭽ߦฝࠬࠗ࠶࠴ࠍߒ㧘ਅࠬࠗ࠶࠴ߢᢥሼࠍㆬࠎߢ ߊ㧚 5㧕Ꮐฝߩࠬࠗ࠶࠴ߢᢥሼࠍㅍࠆߎߣߢ㧘ജߒߚᢥሼߩ ⏕߇ߢ߈ࠆ㧚ୃᱜߒߚߣ߈ߪୃᱜߒߚᢥሼ߇␜ ߐࠇߚߣߎࠈߢਅࠬࠗ࠶࠴ߢᢥሼࠍㆬ߮⋥ߖ߫⦟㧚 6㧕 ᢥሼߩജ߇⚳ࠊߞߚࠄฝࠬࠗ࠶࠴ࠍ⚂ 2 ⑽㐳ߒߔࠆ㧚 ߔࠆߣ␜ࡕ࠼߇ಾࠅᦧࠊࠅ㧘ജߒߚᢥሼ߇Ꮐߦᵹ ࿑ 1 8×8LED ࡑ࠻ࠢࠬࠍ↪ߚ㔚శឝ␜᧼ ࠇߥ߇ࠄ␜ߐࠇࠆ㧚 ߥ߅㧘␜ࡕ࠼ࠍಾࠅᦧ߃ߚߣ߈ߦജߒߚᢥሼ߇ࡑ 㧖 ᖱႎㅢାࠛࠢ࠻ࡠ࠾ࠢࠬᎿቇ⑼ ޥ861-1102 ᾢᧄ⋵วᔒᏒ㗇ደ 2659-2 Dept. of Information, Communication and Electronic Engineering, 2659-2 Suya, Koshi-shi, Kumamoto, Japan 861-1102 ࠗࠦࡦߩౝㇱߩ EEPROM ߦ⸥㍳ߐࠇࠆߩߢ㔚Ḯࠬࠗ࠶࠴ࠍ ಾߞߡ߽㧔㔚ᳰࠍᛮߡ߽㧕⸥㍳ߪᜬߐࠇࠆ㧚ౣᐲ㔚Ḯ Research Reports of Kumamoto-NCT. Vol. 4(2012) - 90 - ࠍࠇߚߣ߈ߪ␜ࡕ࠼ߦߥߞߡࠆߩߢᢥሼࠍജߒ PC0 ߆ࠄ PC3 ߩ 4 ᧄߦធ⛯ߐࠇߚࠬࠗ࠶࠴ߢⴕ߁㔚ሶᎿ ߥ߅ߒߚߣ߈ߪ㧘ฝࠬࠗ࠶࠴ࠍ㐳ߒߒߡജࡕ࠼ߦ ࠠ࠶࠻ߣߒߡឭଏߔࠆ႐วߪࡊࡠࠣࡓᦠ߈ㄟߺᷣߺߩࡑ ಾࠅᦧ߃ࠆ߆㧘Ꮐࠬࠗ࠶࠴ࠍ㐳ߒߒߡࡔࡕᶖࠍⴕ߁㧚 ࠗࠦࡦࠍ↪ᗧߔࠆ߇㧘ISP ┵ሶࠍ↪ߡࡊࡠࠣࡓߩᦠ߈឵ ߃ࠍⴕ߁ߎߣ߇ߢ߈ࠆߩߢᬺ╬ߩᢎ᧚ߣߒߡ࠰ࡈ࠻࠙ࠚ 㔚శឝ␜᧼ߩ࿁〝 ࠕṶ⠌↪ߦ↪ࠆߎߣ߽ߢ߈ࠆ㧚 Ꮢ⽼ߩ 8×8LED ࡑ࠻ࠢࠬ(1)ߩౝㇱ࿁〝ࠍ࿑ 2 ߦ␜ߔ㧚 ࠍኈᤃߦߔࠆߚ㧘ㇱຠὐᢙࠍዋߥߊߒ㧘ኾ↪ߩၮ COL ߦធ⛯ߐࠇߡࠆࡐ࠻ߪᦨೋജ⁁ᘒ㧔⛘✼⁁ᘒ㧕 ᧼ࠍ⸳⸘ߒᄖᵈߒߚ㧚↪ㇱຠߩ㈩⟎ߣㇱຠฬ߇ࠪ࡞ࠢශ ߦߒߡ߅ߊ㧚ROW ߩ 8 ᧄߩାภ✢ߦ L ߹ߚߪ H ࡌ࡞ߩା ߐࠇߡ߅ࠅ㧘ㇱຠ㧔 1㧕ߣኻᲧߒߥ߇ࠄㇱຠࠍࡂࡦ࠳ ภࠍਈ߃㧘COL ࠍ 1 ᧄߕߟ㗅⇟ߦ L ࡌ࡞ജߦಾࠅᦧ߃ ઃߌߔࠇ߫ࠃ㧚ㇱຠଔᩰߩว⸘ߪ 700 ⒟ᐲߣߥߞߚ㧚 ߡߊߣ㧘1 ߕߟ LED ࠍὐἮߐߖࠆߎߣ߇ߢ߈ࠆ㧚ROW 㔚శឝ␜᧼ߩㇱຠ ߦ࠺࠲ࠍਈ߃ߥ߇ࠄ㜞ㅦߦ COL ࠍಾࠅᦧ߃ࠆ࠳ࠗ࠽ࡒ࠶ ⷰ ࠢὐἮᓮߦࠃࠅ␜ࠍⴕ߁㧚 㔚శឝ␜᧼ߩ࿁〝ࠍ࿑ 3 ߦ␜ߔ㧚Atmel ␠ߩ AVR ࡑࠗࠦ ㇱຠฬ ᢙ ⷰ ㇱຠฬ ᢙ ၮ᧼ 㧝ᨎ 㔚ᳰࠤ ࠬ㧔න 3 ဳ 2 ᧄ㧕 8×8.'& ࡑ࠻ ࠢࠬ 㧝 ࠲ࠢ࠻ࠬ ࠗ࠶࠴ 㧠 ࠬࡍࠨ 㧔⿷㧕 㧠ᧄ ࡦ㧔Atmega168P㧕ࠍ↪ߡࠆ㧚 #84 ࡑࠗࠦࡦ 㧔ࡊࡠࠣ ࡓᦠㄟߺᷣ ߺ㧕 Ⓧጀࡒ ࠶ࠢࠦࡦ࠺ ࡦࠨ Ǵ( 㧝 㧝 㔚శឝ␜᧼ߩ࠰ࡈ࠻࠙ࠚࠕ ࡊࡠࠣࡓߩ㐿⊒ߦߪ㧘AVR ߩ⊒ᄁరߢࠆ Atmel ␠߇ ήఘߢឭଏߒߡࠆ⛔ว㐿⊒ⅣႺߩ AVR Studio(2)ߦࡈ ࠰ࡈ࠻ߩ C ࠦࡦࡄࠗ WinAVR(3)ࠍ⚵ߺㄟࠎߛ߽ߩࠍ↪ ߒߚ㧚ࡑࠗࠦࡦߩࡊࡠࠣࡓᦠ߈ㄟߺߦߪ Atmel ␠ߩ ISP ࠷࡞ߢࠆ AVR-ISPMkII ࠍ↪ߒߡࠆ㧚 ࠰ࡈ࠻࠙ࠚࠕߪ㧘ࡑ࠻ࠢࠬ␜㧘ࠠജಣℂ㧘ࡕ ࠼▤ℂ㧘ࡈࠜࡦ࠻ࠃࠅ᭴ᚑߐࠇߡࠆ㧚ࡈࠜࡦ࠻ߦߟߡ㧘 ࿑ 8×8.'& ࡑ࠻ࠢࠬߩ࿁〝 ዊቇ↢ኻ⽎ࠍᗐቯߒߡ߭ࠄ߇ߥࡈࠜࡦ࠻ࠍ 8×8 ࠼࠶࠻ߢ㧘 ROW ߪ AVR ࡑࠗࠦࡦߩࡐ࠻ B㧘COL ߪࡐ࠻ D ߦ⋥ ធធ⛯ߐࠇ߅ࠅߎࠇࠄߩࡐ࠻ߦାภࠍਈ߃ࠆߎߣߢ㧘LED ࡑ࠻ࠢࠬߩ␜ࠍⴕ߁㧚ࡑࠗࠦࡦ߳ߩജߪࡐ࠻ C ߩ ਛቇ↢એߩኻ⽎ࠍᗐቯߒߡࠕ࡞ࡈࠔࡌ࠶࠻߮⸥ภࠍ 8×5 ࠼࠶࠻ߢ⁛⥄ߦᚑߒߚ㧚 ࡈࠜࡦ࠻ߩᚑࠍല₸⦟ߊⴕ߁ߚߦ㧘࿑ 4 ߩࡈࠜࡦ࠻ ࠛ࠺ࠖ࠲ࠍ VisualBasic ࠍ↪ߡߦ㐿⊒ߒߚ㧚 ࿑ 3 㔚శឝ␜᧼ߩ࿁〝 ࿑ 4 8x8 ࡈࠜࡦ࠻ࠛ࠺ࠖ࠲ 熊本高等専門学校 研究紀要 第 4 号(2012) - 91 - 8×8LED ࡑ࠻ࠢࠬࠍ↪ߚ㔚శឝ␜᧼ߩ㐿⊒ߣߘߩᵴ↪㧔⪲ጊ㧕 ߹ߚ㧘2 ᧄߩࡃߩⷺᐲࠍࡐ࠹ࡦ࡚ࠪࡔ࠲ࠍ↪ߡ⸘ ᚑߒߚࡈࠜࡦ࠻࠺࠲ߪ㧘ࡋ࠶࠳ࡈࠔࠗ࡞ߣߒߡ↪ ᷹ߒ㧘ᢥሼജ␜ࠍⴕ߁ࠍ࿑ 7 ߦ␜ߔ㧚߃߫㧘 ߢ߈ࠆ࠹ࠠࠬ࠻ࡈࠔࠗ࡞ߣߒߡജߐࠇࠆࠃ߁ߦߒߚ㧚 㧘㓚ኂ╬ߢㆇേᯏ⢻ߦ㒢߇߆߆ߞߚ⁁ᘒߢ╬ߢ߽ࡃ 㧟㧚㔚శឝ␜᧼ߩᔕ↪ ߥߤන৻ߩࠕ࠽ࡠࠣജᯏེߢᢥሼജ㧘␜߹ߢࠍⴕ ᒛ↪ࠕ࠲࠶࠴ࡔࡦ࠻ߩ ߁ࠪࠬ࠹ࡓߣߒߡ↪ߢ߈ࠆߩߢߪή߆ߣ⠨߃ߡࠆ㧚 ታ↪㕙ࠍ⠨ᘦߔࠆߣ 8×8 ࠼࠶࠻ߢߪᢥሼߩⷞᕈ߇ᖡ㧚 ߘߎߢ㧘␜ㇱಽࠍᮮᣇะߦߍࠆߎߣ߇ߢ߈ࠆࠃ߁ߦၮ ᧼ߩᡷ⦟ߣᒛၮ᧼ߩ㐿⊒ⴕߞߚ㧚࿑ 5 ߦᒛၮ᧼ࠍߞ ߡ␜ㇱࠍᐢߍߚ⁁ᘒࠍ␜ߔ㧚ᒛၮ᧼ߪ LED ࡑ࠻ࠢࠬ ߣหߓߢ⸳⸘ߒߡᮮߦㅪ⚿᧪ࠆࠃ߁ߦߥߞߡ߅ࠅ㧘㔚 Ḯኈ㊂ߩ⸵ߔ㒢ࠅᒛ߇น⢻ߢࠆ㧚 ࿑ 7 ࡃࠍ↪ߡᢥሼജ␜ࠍⴕ߁ⵝ⟎ 㧠㧚㔚శឝ␜᧼ᢎ᧚ߩᵴ↪ 㐿⊒ߒߚ㔚శឝ␜᧼ࠍ᭽ߥޘ႐㕙ߢᵴ↪ߒߡ߽ࠄ߃ࠆࠃ ߁ߦ A4 ߢ 4 ࡍࠫߩࡑ࠾ࡘࠕ࡞㧘⸃⺑ࠍߚ 6 ࡍ ࠫߩࡑ࠾ࡘࠕ࡞㧘࠰ࠬࡊࡠࠣࡓࠍߚ࠰ࡈ࠻࠙ࠚ ࿑ 5 ᒛၮ᧼ࠍߞߚ㔚శឝ␜᧼ߩ␜ ࠕṶ⠌ߦ߽↪ߢ߈ࠆ⸃⺑ᦠࠍ↪ᗧߒߚ㧚ᤨ㑆ߪ㧘ඨ 㔚శឝ␜᧼ߩၮ᧼㕙߆ࠄ㔚Ḯ㧘GND㧘ାภ✢ 2 ᧄࠍข ࠅߒ㧘ᒛၮ᧼ߣߩធ⛯ࠍⴕ߁㧚ᒛၮ᧼ߪ㕙ߦ ↰ઃߌ⚻㛎⠪ߢ 15 ಽ⒟ᐲ㧘ᧂ⚻㛎⠪ߢ߽ 30 ಽ⒟ᐲࠇ߫ ቢᚑߢ߈ࠆ㧚 8x8LED ࡑ࠻ࠢࠬ㧘ⵣ㕙ߦ AVR ࡑࠗࠦࡦ㧔ATmega168P㧕 એਅߦߔࠆᵴ↪߆ࠄ㧘ዊቇᩞ㜞ቇᐕ⒟ᐲ߆ࠄ ࠍ㈩⟎ߒߡ㧘㔚శឝ␜᧼ߣߩㅢାࠍⴕߥ߇ࠄᢥሼߩ␜ ߪน⢻ߢߞߚ㧚ขࠅᛒᣇᴺ߽ࡑ࠾ࡘࠕ࡞ࠍ⺒߫ฃ ࠺࠲ࠍᏀㅍࠅߔࠆᯏ⢻ࠍᜬߚߖߡࠆ㧚 ⻠ኻ⽎⠪ߩ߶ߣࠎߤ߇⠌ᓧน⢻ߢߞߚ㧚 㧕એਅߩᧄᩞਥߩኻᄖᬺߩᢎ᧚㧔࿑ 8㧕 x ߅߽ߒࠈࠨࠗࠛࡦࠬࠊߊࠊߊታ㛎⻠ᐳKPᄤ⨲㨪⑼ቇ ࠕ࠽ࡠࠣജߦࠃࠆ↪ ᄢᅢ߈ੱ㑆ᄢ㓸ว㧍㨪㧔H22.8.28㧕 㔚శឝ␜᧼ߩᏀ┵ߦ↪ᗧߒߚାภ✢ߪࠕ࠽ࡠࠣജߦ߽ x ߅߽ߒࠈࠨࠗࠛࡦࠬࠊߊࠊߊታ㛎⻠ᐳ㨪⑼ቇᄢᅢ߈ ↪ߢ߈ࠆ㧚ߘߎߢ㧘ࠕ࠽ࡠࠣജߦࠃࠅᢥሼㆬᛯࠍⴕ߁ ੱ㑆ᄢ㓸ว㧍㨪㧔H23.5.14㧕 ␜ེߣߒߡߩ↪ࠍ⠨߃ߚ㧚࿑ 6 ߪ㔚⏛⺃ዉࠍ↪ߒߡ 2 x ߅߽ߒࠈࠨࠗࠛࡦࠬࠊߊࠊߊታ㛎⻠ᐳKPᄤ⨲㨪⑼ቇ ᜰߩ〒㔌ࠍ⸘᷹ߒ㧘ᢥሼജ␜ࠍⴕ߁ⵝ⟎ߢࠆ㧚 ᄢᅢ߈ੱ㑆ᄢ㓸ว㧍㨪㧔H23.8.18㧕 ࿑ 6 2 ᜰߩ〒㔌ߢᢥሼജ␜ࠍⴕ߁ⵝ⟎ ࿑ 8 ኻᄖᬺߢߩᵴ↪ Research Reports of Kumamoto-NCT. Vol. 4(2012) - 92 - 㧕ᧄᩞࠝࡊࡦࠠࡖࡦࡄࠬߩᖱႎㅢାࠛࠢ࠻ࡠ࠾ࠢࠬᎿ ቇ⑼ߩ㛎ᬺߩᢎ᧚ 㧕ᖱႎㅢାᎿቇ⑼ 4 ᐕߩ⸘▚ᯏᎿቇߦ߅ߡࡂ࠼࠙ࠚࠕ ߣ࠰ࡈ࠻࠙ࠚࠕṶ⠌ߩᢎ᧚ 㧡㧚߅ࠊࠅߦ 㐿⊒ߒߚ㔚శឝ␜᧼ߩࠠ࠶࠻ߪ㧘ታ㓙ߦࠝࡊࡦࠠࡖࡦ ࡄࠬ╬ߢᵴ↪ߒߡᅢ⹏ࠍᓧࠆߎߣ߇ߢ߈ߚ㧚 㔚ሶឝ␜᧼ߩ࿁〝㧘࠰ࡈ࠻࠙ࠚࠕ㧘߮ࡈࠜࡦ࠻ᚑࠛ ࠺ࠖ࠲ߪࡉࡠࠣ(4)ߢ㐿ߒߡ߅ࠅ㧘↳ߒ߇ࠇ߫㔚ሶ࠺ ࠲ߩឭଏ߽น⢻ߢࠆ㧚ᣢߦᢙઙߩวࠊߖߦᔕߓߡ࠰ ࠬࡈࠔࠗ࡞ߩឭଏߥߤࠍⴕߥߞߡ߅ࠅ㧘ᓟ߽ᐢߊᢎ᧚ ߣߒߡ↪ߒߡ㗂ߌࠇ߫ᐘߢࠆ㧚 㧔ᐔᚑ 24 ᐕ 9 25 ᣣฃઃ㧕 㧔ᐔᚑ 24 ᐕ 11 7 ᣣฃℂ㧕 ෳ⠨ᢥ₂ (1) http://akizukidenshi.com/catalog/g/gI-05738/ (2) http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 (3) http://winavr.sourceforge.net/ (4) http://plaza.rakuten.co.jp/cpu4edu/ 熊本高等専門学校 研究紀要 第 4 号(2012) - 93 -