
Originally Posted by
passion1
After reading another thread I added
LOW PORTC.0
just before the loop and this seemed to solve my problem!
Why would that be?
Isn't TRISC %11111000 supposed to set PORTC.0 as an output?
Hello Passion1,
Yes TRISC <font color=red><b>=</b></font color>%11111000 will set RC0 as an output
LOW PORTC.0 is a RMW operation and the data sheet advises not to do this on portC of this chip. RC.0 shares TMR1clockin and osc functions so you want to disable those if using as a standard I/O so:
T1CON.0 = 0 'disable timer 1
CCP1CON=0 ' disable capture compare module which works with timer 1
Datasheet SEC. 4.3
"Since the TRIS bit override is in effect while peripheral is enabled, read-modify-write instructions (BSF, BCF, XORWF) with TRISC as destination should be avoided."
Last edited by Archangel; - 14th February 2009 at 19:23.
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