fiture
MCU Atmega 8au / SMD
programable SPI interface
UART/USART Serial
4 pin ADC
I2C serial
6 pin I/O
4 Relay Switch
mapping Hardware
Relay 1 PD.6
Relay 2 PD.7
Relay 3 PB.0
Relay 3 PB.1
UART PD.0 //RX
UART PD.1//TX
ADC.0 PC.0
ADC.1 PC.1
ADC.2 PC.2
ADC.3 PC.3
SDA PC.4
SCL PC.5
gambar skematik
gambar PCB
pdf file pcb
eagle pcb
contoh program cek relay CVAVR
#include <mega8.h>
#define rl_1 PORTD.6
#define rl_2 PORTD.7
#define rl_3 PORTB.0
#define rl_4 PORTB.1
#define on 1;
#define off 0;
void main(void)
{
// Bit1=Out Bit0=Out
DDRB=(1<<DDB1) | (1<<DDB0);
// Bit1=0 Bit0=0
PORTB=(0<<PORTB7) | (0<<PORTB6);
DDRD=(1<<DDD7) | (1<<DDD6);
// State: Bit7=0 Bit6=0
PORTD=(0<<PORTD7) | (0<<PORTD6);
while (1)
{
rl_1 = on ;
rl_2 = on ;
rl_3 = on ;
rl_4 = on ;
}
}
No comments:
Post a Comment