INTCON or Interrupt-on-Change IOCCON ?
INTCON = 00 0 0 0 0 0 1
bit 7-6 = 0 / unimplemented
bit 5 = gpio.5
bit 4 = gpio.4
bit 3 = gpio.3
bit 2 = gpio.2
bit 1 = gpio.1
bit 0 = gpio.0
GPIO.0 = M_BUT so 1 = enable![]()
INTCON or Interrupt-on-Change IOCCON ?
INTCON = 00 0 0 0 0 0 1
bit 7-6 = 0 / unimplemented
bit 5 = gpio.5
bit 4 = gpio.4
bit 3 = gpio.3
bit 2 = gpio.2
bit 1 = gpio.1
bit 0 = gpio.0
GPIO.0 = M_BUT so 1 = enable![]()
So does this look right;
[html]
'---------- Options ------------------------------------------------------------
define OSC 4 'Set oscillator (clk) to 4MHz
OSCCON = %01100111 'Oscillator Settings
ANSEL = %000000 'Analog/Digital ports
INTCON = %00000001 'GPIO External interrupts
GPIO = %000000 'Set High/Low GPIO.5 -> GPIO.0 (all low)
TRISIO = %001001 'Set input/output GPIO.5 -> GPIO.0 (GP0 & 3 input)
[/html]
Problem it is throwin some errors on it.
no compilation error here...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
ya got me, thanks.. I didn't realize that was important, thought it was only used for programming
All I need to do is make use of interrupts and I think this thing is ready for a try![]()
Last edited by erice1984; - 5th July 2007 at 19:29.
Bookmarks