Hi lugo.p,
Let's start off with, change the big old Capital B to the word code, then your code tag will work, do it on both ends.
Add this to your code along with the proper configs and define your OSC.
Code:
ON INTERRUPT GoTo disparo
INTCON = %10001001
'Bit 0 = RAIF Port A Interrupt Flag
'Bit 1 = INTF INT Flag
'Bit 2 = T0IF Timer zero Interrupt Flag
'Bit 3 = RAIE Port A Interrupt ENABLE
'Bit 4 = INTE INT Enable
'Bit 5 = T0IE Timer zero Interrupt Enable
'Bit 6 = PEIE Peripheral Interrupt Enable
'Bit 7 = GIE Global Interrupt Enable
IOCA = %00000001 ' enable IOC on RA0
'Bit 0 = RA0 interrupt on change
'Bit 1 = RA1 " " " " "
'Bit 2 = RA2 " " " " "
'Bit 3 = RA3 " " " " "
'Bit 4 = RA4 " " " " "
'Bit 5 = RA5 " " " " "
'Bit 6 = Unimplemented
'Bit 7 = Unimplemented
OPTION_REG = %00000000
'Bit 0 = PS Prescaler
'Bit 1 = PS Prescaler
'Bit 2 = PS Prescaler
'Bit 3 = PSA Prescaler Assignment bit
'Bit 4 = T0SE Timer zero source edge select bit
'Bit 5 = T0CS Timer zero clock source select bit
'Bit 6 = INTEDG Interrupt Edge Select bit
'Bit 7 = RAPU PortA weak pullup bit
Last edited by Archangel; - 5th March 2010 at 04:32.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks