Witam. Dalczego napiecia na pinach są rózne dla programu w C i Bascoma:
- dla c H -> 3.68V
#include <avr\io.h>
int main(void)
{
//konfig portu
PORTA=0xAA;
DDRA=0xFF;
while(1);
return 0;
}
- dla Bascoma H -> 5V
$regfile "m8535.dat"
$crystal = 8000000
config porta = output
porta = &b10101010
end
Uklad to atmega8535, opisywane piny pozostaja nie podlaczone, zasilanie 5V
dzieki
napiecie na pinach
Tak, stworzylem go w MFILE WinAVR-a, oto jego poczatek:
# MCU name
MCU = atmega8535
F_CPU = 8000000
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
# Target file name (without extension).
TARGET = porty_main
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c
ASRC =
# Optimization level, can be [0, 1, 2, 3, s].
OPT = s
DEBUG = dwarf-2
[ Dodano: 2006-07-31, 12:19 ]
Przyczyną problemów okazał sie aktywny watchdog
# MCU name
MCU = atmega8535
F_CPU = 8000000
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
# Target file name (without extension).
TARGET = porty_main
# List C source files here. (C dependencies are automatically generated.)
SRC = $(TARGET).c
ASRC =
# Optimization level, can be [0, 1, 2, 3, s].
OPT = s
DEBUG = dwarf-2
[ Dodano: 2006-07-31, 12:19 ]
Przyczyną problemów okazał sie aktywny watchdog