Skip to content

Instantly share code, notes, and snippets.

@blondie7575
Created August 19, 2012 23:59
Show Gist options
  • Save blondie7575/3398685 to your computer and use it in GitHub Desktop.
Save blondie7575/3398685 to your computer and use it in GitHub Desktop.
INT2_vect:
// Get ourselves completely off the bus
clr accum
out PORTD,accum
out DDRD,accum
out DDRC,accum
out DDRA,accum
sbi PORTB,vramWrite
sbi PORTB,vramOE
// Enable the CPU's bus access
cbi PORTB,cpuBusAllow
// Assuming CPU is now driving the bus,
// perform the write
cbi PORTB,vramWrite
sbi PORTB,vramWrite
// Cut off the CPU and reenable our access
sbi PORTB,cpuBusAllow
cbi PORTB,vramOE
ldi accum,0xff
out DDRC,accum
out DDRA,accum
reti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment