Tugas Pendahuluan Modul 3
2. Rangkaian Simulasi [kembali]
3. Flowchart [kembali]
4. Listing Program [kembali]
#include <mega128.h>
#include <delay.h>
void tekan_keypad_tampil_sevseg()
{ PORTF = 0b11111011;
delay_ms(1);
if (PINF.4 == 0) {
PORTD=0X06 ;
delay_ms(3);}
if (PINF.5 == 0) {
PORTD=0X66;
delay_ms(3);}
if (PINF.6 == 0) {
PORTD=0X07;
delay_ms(3);}
PORTF = 0b11111101;
delay_ms(1);
if (PINF.4 == 0) {
PORTD=0X5B;
delay_ms(3);}
if (PINF.5 == 0) {
PORTD=0X6D;
delay_ms(3);}
if (PINF.6 == 0) {
PORTD=0X7F;
delay_ms(3);}
PORTF = 0b11111110;
delay_ms(1);
if (PINF.4 == 0) {
PORTD=0X4F;
delay_ms(3);}
if (PINF.5 == 0) {
PORTD=0X7D;
delay_ms(3);}
if (PINF.6 == 0) {
PORTD=0X06;
delay_ms(3);}
}
void main(void) {
PORTF = 0xff;
DDRF = 0x0f;
PORTD=0x00;
DDRD=0XFF;
while(1) {
tekan_keypad_tampil_sevseg();
}
;
}
5. Video [kembali]
6. Link Download [kembali]
Download rangkaian proteus Disini
Download video rangkaian
Download program atmega128 Disini
Komentar
Posting Komentar