alexa-tracking
Kategori
Kategori
Home / FORUM / All / Hobby / Hobby & Community /
Hobby Elektronika Digital, MicroController & solder Menyolder gabung sini Yuks
KASKUS
51
244
https://www.kaskus.co.id/thread/000000000000000002654259/hobby-elektronika-digital-microcontroller-amp-solder-menyolder-gabung-sini-yuks

Hobby Elektronika Digital, MicroController & solder Menyolder gabung sini Yuks

DIGITAL ELECTRONICS HOBBY FORUM




Spoiler for apa aja sih yang dibahas?:


Spoiler for "Hobby Microcontroller Itu Mahal ? Kreativitasmu Itu yg Mahal Gan !":




UPDATE 8/JUNI/2014

DUKUN FUSEBIT AKAN MENGHIDUPKAN IC MU YANG MATI !



Selengkapnya dibahas di sini gan !!

CLINOMETER SEDERHANA MEMANFAATKAN ADC



Selengkapnya dibahas di post berikut




Spoiler for Buka Jika Mau Paket Belajar:


Proyek2 micro yg sudah jadi
Quote:



I.N.D.E.X F.O.R.U.M

Quote:




Biar ngiler, ane kasih contoh hasil karya TS...






Spoiler for Contact TS lewat dimari yahh:



.
Diubah oleh ahocool
TEXT DISPLAY ATMega 8515 + 12 LED MATRIX

Berhubung ada yg mesen komponen buat bikin TEXT DISPLAY dan sudah kelar programmingnya, ane share dimari deh schematic + listing program AVR

sapa tau AGAN2 ada yg tertarik bikin...

schematic nya seperti ini

Spoiler for gambar segede gajah BW KILLER:



sedangkan listing programnya ...

Code:


//clock internal diset di "fuse" SUT_CKSEL = internal 8MHZ
#define F_CPU 8000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include <inttypes.h>
#include <avr/interrupt.h>
#include <avr/iom8515.h>
#include <avr/pgmspace.h>
#include <string.h>




//BIT karakter LED MATRIX dalam hexa
const char textset[] PROGMEM =
{0x30, 0x4a, 0x4a, 0x4a, 0x7c,//a
0x7f, 0x28, 0x44, 0x44, 0x38,//b
0x80, 0x38, 0x44, 0x44, 0x44,//c
0x38, 0x44, 0x44, 0x28, 0x7f,//d
0x38, 0x54, 0x54, 0x54, 0x18,//e
0x08, 0x7e, 0x09, 0x09, 0x02,//f
0x08, 0x54, 0x54, 0x54, 0x3c,//g
0x7f, 0x08, 0x04, 0x04, 0x78,//h
0x80, 0x44, 0x7d, 0x40, 0x80,//i
0x20, 0x40, 0x44, 0x3d, 0x80,//j
0x80, 0x7f, 0x18, 0x24, 0x42,//k
0x80, 0x41, 0x7f, 0x40, 0x80,//l
0x7c, 0x04, 0x78, 0x04, 0x78,//m
0x7c, 0x08, 0x04, 0x04, 0x78,//n
0x38, 0x44, 0x44, 0x44, 0x38,//o
0x7c, 0x14, 0x14, 0x14, 0x08,//p
0x08, 0x14, 0x14, 0x14, 0x7c,//q
0x7c, 0x08, 0x04, 0x04, 0x08,//r
0x48, 0x54, 0x54, 0x54, 0x24,//s
0x80, 0x04, 0x3f, 0x44, 0x44,//t
0x3c, 0x40, 0x40, 0x20, 0x7c,//u
0x1c, 0x20, 0x40, 0x20, 0x1c,//v
0x3c, 0x40, 0x30, 0x40, 0x3c,//w
0x44, 0x28, 0x10, 0x28, 0x44,//x
0x0c, 0x50, 0x50, 0x50, 0x3c,//y
0x44, 0x64, 0x54, 0x4c, 0x44,//z
0x3e, 0x51, 0x49, 0x45, 0x3e, //0
0x80, 0x42, 0x7f, 0x40, 0x80, //1
0x42, 0x61, 0x51, 0x49, 0x46, //2
0x41, 0x41, 0x45, 0x4b, 0x31, //3
0x18, 0x14, 0x12, 0x7f, 0x10, //4
0x27, 0x45, 0x45, 0x45, 0x39, //5
0x3c, 0x4a, 0x49, 0x49, 0x31, //6
0x01, 0x71, 0x09, 0x05, 0x03, //7
0x36, 0x49, 0x49, 0x49, 0x36, //8
0x06, 0x49, 0x49, 0x29, 0x1e, //9
0x7e, 0x11, 0x11, 0x11, 0x7e, //A
0x7f, 0x49, 0x49, 0x49, 0x36, //B
0x3e, 0x41, 0x41, 0x41, 0x22, //C
0x7f, 0x41, 0x41, 0x22, 0x1c, //D
0x7f, 0x49, 0x49, 0x49, 0x41, //E
0x7f, 0x09, 0x09, 0x09, 0x01, //F
0x3e, 0x41, 0x49, 0x49, 0x7a, //G
0x7f, 0x08, 0x08, 0x08, 0x7f, //H
0x80, 0x41, 0x7f, 0x41, 0x80,//I
0x20, 0x40, 0x41, 0x3f, 0x01, //J
0x7f, 0x08, 0x14, 0x22, 0x41, //K
0x7f, 0x40, 0x40, 0x40, 0x40, //L
0x7f, 0x02, 0x04, 0x02, 0x7f, //M
0x7f, 0x04, 0x08, 0x10, 0x7f, //N
0x3e, 0x41, 0x41, 0x41, 0x3e, //O
0x7f, 0x11, 0x11, 0x11, 0x0e, //P
0x3e, 0x41, 0x51, 0x21, 0x5e, //Q
0x7f, 0x09, 0x19, 0x29, 0x46, //R
0x46, 0x49, 0x49, 0x49, 0x31, //S
0x01, 0x01, 0x7f, 0x01, 0x01, //T
0x3f, 0x40, 0x40, 0x40, 0x3f, //U
0x1f, 0x20, 0x40, 0x20, 0x1f, //V
0x3f, 0x40, 0x38, 0x40, 0x3f, //W
0x63, 0x14, 0x08, 0x14, 0x63, //X
0x07, 0x08, 0x70, 0x08, 0x07, //Y
0x61, 0x51, 0x49, 0x45, 0x43, //Z
0x80, 0x80, 0x80};//""

// untuk menterjemahkan input text
const char textreal[] PROGMEM= { 'a','b','c','d','e','f','g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3',
\t\t\t\t '4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J',
\t\t\t\t 'K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',' ' } ;


char blk = 0x80;
char fulltext[65] ; //ARRAY isi dari tiap KOLOM

//definisi text yg akan ditampilkan
char textnya1[] = "Led Matrix";
char textnya2[] = "ATMega8515";
char textnya3[] = " AHOCOOL";
char textnya4[] = " SurabayA";
char textnya5[] = " 2011 ";




void resetnya(void)

{

PORTE |= _BV(PE1);
PORTE &= ~_BV(PE1);

}


void clocknya(void)

{
PORTE |= _BV(PE2);
PORTE &= ~_BV(PE2);

}

void cleartext(void) // MEMBERSIHKAN data DOT menjadi kosong
{ uint8_t i;


for(i=0 ; i <65 ; i++)
{ fulltext[i] = 0 ; }

}


void convert_text(char *texte) //penerjemah karakter ke BIT MATRIX
{

uint8_t a,b,max_text;
int c,d;

char dummy[1];

max_text=strlen(texte);

for(a=0 ; a<max_text; a++)

{
for(b=0;b<65;b++) // maximum disesuaikan jumlah definisi text
\t
\t\t {
strncpy_P(dummy,&textreal[b],1);
\t
\t\t\tif ( texte[a] == dummy[0]) break;

\t\t }

d=b*5;

if(dummy[0] != ' 'emoticon-Wink for(c=d; c<d+5; c++) strncat_P(fulltext,&textset[c],1); //spasi
else for(c=d; c<d+3; c++) strncat_P(fulltext,&textset[c],1);

\t strncat(fulltext,&blk,1);
}

}


void tulis_text(void)
{
uint8_t a,b;

a=1;
b=0;

resetnya();

while(a<68)

{

\tif(a%9 == 0 )
\t
\t{clocknya(); //buat loncat antar 4017
a++;
\t}

else
\t{
PORTC=fulltext[b];

\tclocknya();

\t_delay_us(300);

PORTC=0x80; //biar tidak berbayang

b++;
\ta++;
\t }



}




}








int main(void)
{
uint8_t loop;

DDRC = 0b11111111; // portC = data text dot matrix
DDRE = 0b110; // clock PE2, reset : PE1 untuk 4017

PORTE =0b100;



\t




\twhile(1)
\t {

// loop untuk menampilkan text
//tambahkan sesuai keinginan

convert_text(textnya1);\t
for(loop=0;loop<100;loop++) tulis_text(); //max loop = lama tampil
\t cleartext();

convert_text(textnya2);\t
for(loop=0;loop<100;loop++) tulis_text();
cleartext();

convert_text(textnya3);\t
for(loop=0;loop<100;loop++) tulis_text();\t
\t cleartext();

convert_text(textnya4);\t
for(loop=0;loop<100;loop++) tulis_text();\t
\t cleartext();

convert_text(textnya5);\t
for(loop=0;loop<100;loop++) tulis_text();\t
\t cleartext();

\t }



\t
\t

\t
return 0;
}




TEXT display ini menggunakan AVR ATMega 8515 dengan clock internal 8MHZ ....
code yg diatas cuman permulaan aja, belum bisa animasi scroll ...cuman buat ngetest alat berfungsi / tidak
untuk scroll/animasi kita bahas dilain waktu

ntar hasil akhir bisa bikin yg kaya gini :

×
GDP Network
© 2019 KASKUS, PT Darta Media Indonesia. All rights reserved
Ikuti KASKUS di