Interrupt driven routine for Avr 16-bit PWM

Posted in June 28th, 2007

Target: ATtiny2313
Uses OCR0A, TCNT0, TCNT1
With ATtiny2313 it is possible to utilize two 16-bit PWM using OC1A and OC1B.
If application needs more than this, say RGB controller, two additional 16-bit channels can be created from native 8-bit OC0A and OC0B. The resolution is true 16-bit, glitch-free. Prescaler can be set to 1.
The software [...]

Read more from this topic...

PIC Arithmetic 16-bit

Posted in June 27th, 2007

Target: PIC16C71
; Bit definitions

#define _c status,0
#define _z status,2
#define _dc status,1

#define _gie intcon, 7

; Macro definitions

Bank1 macro
bsf [...]

Read more from this topic...

I2C for 8051

Posted in June 26th, 2007

Target: 8051
Content of .asm file
; ***************************************************************
; This collection of routines allows an 80×51 microcontroller
; to read and write the I2C devices
; FOSC = 24MHz.
; ***************************************************************

_R EQU 0

SDA EQU [...]

Read more from this topic...