Files
SyncHome/trunk/workspace/gcb/tiny13-blink.gcb
topicchi c79ed8aef4
2025-10-16 20:52:37 +00:00

46 lines
1.2 KiB
Plaintext

' ########### start ###########
' avr:tiny13
' ########### end ###########
'
' ******************************************************************
' A program to flash LED on PORTB.0
' 2016-06-30 (c) Paolo Iocco
' ******************************************************************
'
' Circuit diagram
' ---------------
' ATtiny 13/45/85 Pin map
' +--\/--+
' +5V>--/Reset ADC0 PB5---|1° 8|---Vcc----------------<+5V
' ADC3 PB3 -|2 7|- PB2 ADC1 SCK
' ADC2 PB4 -|3 6|- PB1 OC0B MISO AIN1
' GND>--------------GND---|4 5|---PB0 OC0A MOSI AIN0->LED
' +------+
'
' -------------------------------------------------------------
' 9.6MHz:
' LFuse: 0x7A; HFuse: 0x1F;
' AVRDude: avrdude -B 10 -c USBasp -p attiny13 -U lfuse:w:0x7a:m -U hfuse:w:0x1f:m
'
' ******************************************************************
' Chip model
#chip tiny13, 9.6
#define led PORTB.3
dir led out
'Startup routine
Startup:
'Main routine
Loop:
'Turn one LED on, the other off
SET led ON
Wait 100 ms
'Now toggle the LEDs
SET led OFF
Wait 100 ms
'Jump back to the start of the program
goto Loop