gnupic: PWM in assembler


Previous by date: 19 Nov 2004 19:45:27 +0000 Re: Requests for adding support to program chips to PikDev?, David Willmore
Next by date: 19 Nov 2004 19:45:27 +0000 Re: PWM in assembler, Snail Instruments
Previous in thread:
Next in thread: 19 Nov 2004 19:45:27 +0000 Re: PWM in assembler, Snail Instruments

Subject: PWM in assembler
From: Dante ####@####.####
Date: 19 Nov 2004 19:45:27 +0000
Message-Id: <Pine.LNX.4.61.0411191923420.11024@azathoth>

Ok, I have held off posting this, mainly due to the fact that I am 
uncertain that this is the correct forum for this question. I am currently 
using gpasm and gpsim to code for the 16C65B. I need the Pwm features 
(amongst other things) available on this chip. I had thought that perhaps 
I was doing something improperly, Then I began to suspect other things. 
Having encountered the same problem with different simulators, I am back 
to my original theory. I suspect that the issue centers around my not 
properly understanding what is meant by initializing the ccp1 module. Here 
is what I am doing:
 	The manual provided for the chip indicates the following steps are 
to be taken to enable the PWM on CCP1 (RC2).

I preform the operations in the following order:
reset ccp1con (17h)

set bits 2,3 in 17h

set the period of the PWM in PR2 (92h)

set the duty cycle by writing to ccpr1l (15h)
  set the LSBs for duty cycle in bits 4,5 in ccpr1l (17h)

clear trisC bit 2

set t2con (12h) bit 2 for prescale value

Now, the manual specifies enabling the CCP1 module. I have absolutely no 
idea what is meant by this. Can anyone point me in the proper direction??

Thanks,
Keith


-- 
"I saw a really neat proof showing x^n+y^n=z^n has no solution for
non-zero integers x, y, and z when n>2, but there is not enough space to
show it in this sig."

Previous by date: 19 Nov 2004 19:45:27 +0000 Re: Requests for adding support to program chips to PikDev?, David Willmore
Next by date: 19 Nov 2004 19:45:27 +0000 Re: PWM in assembler, Snail Instruments
Previous in thread:
Next in thread: 19 Nov 2004 19:45:27 +0000 Re: PWM in assembler, Snail Instruments


Powered by ezmlm-browse 0.20.