Am 10.05.2012 14:18, schrieb Jan Kromhout:
> Hello,
> 
> I'm looking in some code to look how the analog write is working.
> I see commands like sbi(…,…) and chi(…,…)

SBI means Set Bit in Io-register. CBI in analogy Clear Bit
in Io register.

The atmegas use a 5bit address range for some IO registers (mostly
PORTs and CPU related stuff like stack pointers). This is by far
not enough for all IO related things. But this limited address space
can be used with a special instruction set (sbi and cbi) to manipulate
single bits in one (or two) CPU cycles.

A similiar instruction set exists for the 32 CPU registers: SBR and CBR

Atmel has published a lengthy document "8-bit AVR Instruction Set" that
covers each and every command.

Matthias

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to