Files
SyncHome/trunk/workspace/gcb/tiny85-blink.gcb
2023-03-09 12:51:54 +00:00

44 lines
1.1 KiB
Plaintext

' ########### start ###########
' avr:tiny85
' ########### 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
' +------+
'
' -------------------------------------------------------------
'
' 8MHz, internal RC Oscillator
' Fuses:
' AVRDude: avrdude -B 10 -c USBasp -p attiny85 -U lfuse:w:0xe2:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
'Chip model
#chip tiny85, 8
#define led PORTB.0
dir led out
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