[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [4807] Flashing with two channels!
From: |
Martin Mueller |
Subject: |
[paparazzi-commits] [4807] Flashing with two channels! |
Date: |
Sat, 17 Apr 2010 10:24:16 +0000 |
Revision: 4807
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4807
Author: mmm
Date: 2010-04-17 10:24:16 +0000 (Sat, 17 Apr 2010)
Log Message:
-----------
Flashing with two channels!
Modified Paths:
--------------
paparazzi3/trunk/sw/in_progress/blitzer/blitzer.c
Modified: paparazzi3/trunk/sw/in_progress/blitzer/blitzer.c
===================================================================
--- paparazzi3/trunk/sw/in_progress/blitzer/blitzer.c 2010-04-17 03:25:53 UTC
(rev 4806)
+++ paparazzi3/trunk/sw/in_progress/blitzer/blitzer.c 2010-04-17 10:24:16 UTC
(rev 4807)
@@ -25,8 +25,8 @@
/** \file blitzer.c
* \brief LED flasher
*
- * Flashes a LED connected to PB1 (pin 6) of an ATTINY45 through
- * an IRML2502 transistor, PB1 low -> LED off.
+ * Flashes a LED connected to PB1 (pin 6) and PB2 (pin 7) of an
+ * ATTINY25 through an IRML2502 transistor, PBx low -> LED off.
*
* fuse high byte: 0xdf, fuse low byte: 0x62
*
@@ -46,17 +46,22 @@
int main(void)
{
+ DDRB |= (1 << PB2); // PB2 output
DDRB |= (1 << PB1); // PB1 output
DDRB &= ~(1 << PB0); // PB0 input
while (1)
{
+ PORTB |= (1 << PB2);
PORTB |= (1 << PB1);
wait(25);
+ PORTB &= ~(1 << PB2);
PORTB &= ~(1 << PB1);
wait(110);
+ PORTB |= (1 << PB2);
PORTB |= (1 << PB1);
wait(25);
+ PORTB &= ~(1 << PB2);
PORTB &= ~(1 << PB1);
wait(780);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [4807] Flashing with two channels!,
Martin Mueller <=