User:Frosti/Sensors, Actuators, and Displays: Difference between revisions

From Fab Lab Wiki - by NMÍ Kvikan
Jump to navigation Jump to search
No edit summary
avr test
Line 10: Line 10:


[[Image:Step speaker test.png|thumb|500 px|left]]
[[Image:Step speaker test.png|thumb|500 px|left]]
==AVR ==
*SBI -> Set Bit in I/O Register
*CBI -> Clear Bit in I/O Register
*LDI -> Load Immediate
*BRNE-> Branch if Not Equal
First we made some experiments
*Open AVR studio
*File New Project
*Write .asm code
include "tn44def.inc";
sbi DDRA, 0;
ldi R18, 10;
LoopA:
sbi PORTA, 0;
ldi R19, 15;
Loop2:
dec R19;
brne Loop2;
cbi PORTA, 0;
ldi R19, 20;
Loop3:
dec R19;
brne Loop3
  dec R18;
  brne LoopA;
*Build and Run
*Step into


==Links==
==Links==

Revision as of 14:08, 29 March 2010

Hello Speaker and Hello Step I decided to try to start making the board, by drawing it in Eagle.

First I drew hello.speaker.45.MTA.

Then I tried to use Inkscape to

AVR

  • SBI -> Set Bit in I/O Register
  • CBI -> Clear Bit in I/O Register
  • LDI -> Load Immediate
  • BRNE-> Branch if Not Equal

First we made some experiments

  • Open AVR studio
  • File New Project
  • Write .asm code
include "tn44def.inc";
sbi DDRA, 0;
ldi R18, 10;
LoopA:
	sbi PORTA, 0;
	ldi R19, 15; 
	Loop2:
		dec R19;
		brne Loop2;
		cbi PORTA, 0;
		ldi R19, 20;
		Loop3:
			dec R19;

brne Loop3

 	dec R18;
 	brne LoopA;
  • Build and Run
  • Step into


Links