[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [gnupic] simulating an interrupt
From: Robert Pearce ####@####.#### Date: 10 Dec 2006 13:11:06 +0000 Message-Id: <R966BvCfYAfFFwWA@daniel.huneausware.local> On Sat, 9 Dec 2006, Maxim Wexler ####@####.#### wrote : > > I'm not even sure what to expect. Like I say, once it's running, how do >you "interrupt" it without stopping it? Hope that makes sense. It should be possible, using the breadboard, to toggle one of the port B bits. However, there are a couple of points to note: The change of state interrupt on PORTB is actually triggered when one of the bottom four bits differs from the last value _read_by_the_CPU_ - your code never reads port B. You need to add: movf portb,w in the ISR before clearing the interrupt bit, and possibly also just before payrol: It shouldn't be needed, but it's good practice to explicitly set TRISB to input. Pins connected to nodes don't always respond to the breadboard mouse click. If you want to be absolutely certain, you could connect a pull-up resistor and a switch to ground. Except the current switch module is a two-pin device, and there's no convenient ground module. So you need to create a ground by using a pull-down resistor of zero ohms. However, an unconnected input pin should be toggle-able with a mouse click. -- Rob Pearce http://www.bdt-home.demon.co.uk The contents of this | Windows NT crashed. message are purely | I am the Blue Screen of Death. my opinion. Don't | No one hears your screams. believe a word. | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [gnupic] simulating an interrupt
From: "Maxim Wexler" ####@####.#### Date: 11 Dec 2006 14:26:59 +0000 Message-Id: <a0811460612110625o3ffbf897u78bd99aebff8acc7@mail.gmail.com> > > create a ground by using a pull-down resistor of zero ohms. However, an > unconnected input pin should be toggle-able with a mouse click. > Heh. I didn't realize those things were clickable. Thanks. Now it works. Maxim | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |