Toggle doesn't work because you have'nt disable the ADCs.
Toggle doesn't work because you have'nt disable the ADCs.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hahaha I just stumbled across one of Melanies posts mentioning that, http://www.picbasic.co.uk/forum/showthread.php?t=977
This chip has CCP module on portC. Good call Steve.
Last edited by Archangel; - 1st May 2009 at 02:29.
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.
It shouldn't affect portE which is where 2 of my relay pins are. I will try it anyway and let you know. Thanks for the suggestion!
Nick
I went through and disabled everything and then some on portA and PortE. No dice. portA and PortE change from low to high but does not toggle. In fact it undoes any set pins on portA and E. It does not alter them at the bit level individually. My desired function is to latch individual pins in either 1 or 0 condition to energize a relay or de-energize it, through the decoding of local switch presses. I need to take a step back or something....thanks for your help guys.
Nick
The micro is on a circuit board. It uses a 20Mhz resonator and I am using in-circuit-programming. All ports are on header pins and not tied to anything, except for the button switches which are pulled low via 10k resistors. I have physical jumpers to put the hardware into ICP mode and then back to normal mode. I can set ports when the interrupt routine is called on any button press, but it does not decode the content of the variable I place the key press in to. IE, it blasts through conditional statements.
I can set bit wise port A and Port E within the interrupt. If within the interrupt I set portA (your bit of choice) and then use a conditional statement to reset portA (your chosen bit) if the bit is set...it does nothing....the port bit stays set. Toggle does nothing to alter the port logic level output.
Very strange.
Last edited by Macgman2000; - 3rd May 2009 at 21:21. Reason: toggle issue
Bookmarks