CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Sending data one way with two PIC12F683

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
anestho



Joined: 27 Dec 2006
Posts: 28

View user's profile Send private message

Sending data one way with two PIC12F683
PostPosted: Wed Dec 27, 2006 2:16 pm     Reply with quote

Hello, I have been lurking a while now, but can't find the answer for this problem. I am using the PICS in an IR reciever application and weight is of the issue. I know that going to a larger more capable chip may be easier, but I need to coserve weight. I am using the chip to decode a digital signal from an IR sensor. The PWM is used to drive pager motors - need at least 1000 Hz.

I have 1 12F683 use the EXT interrupt to decode a transmitted signal (start is a gap low for 2.5ms, then followed by 7 1ms-2ms pulse widths)

I tried creating a PWM for 2 outputs (not H-bridges) using the timer2 interrupt, but its too slow to effectively drive a 6 mm pager motor (motor never sees full voltage). I changed my approach to polling a PWM routine after each 2-3 statements, and this works well except for a bit of jitter due to the EXT interrupt (I can't poll the sub from here). The PWM is 16 steps, not sure of the period, but it works with the motor. The sub has a frame counter. WHen the counter reaches 20, its reset and the pins are turns on if the value is > 0. The sub also checks if the pin counter is > frame counter and turns off the pin if it is. Not sure how to check the time it takes this routine to complete?

I now want to do something similar to drive 4 motors with software PWM. I can't do this with 1 chip, since not enough pins and also the PWM is very processor intensive.

I thought about using 1 12F683 to be a dedicated PWM co-processor continually outputing 4 pins of PWM. Both chips will use 8Mhz internal osc.

What is the max frequency I can drive the 4 PWM (all different) with a duty cycle that can vary from 0-100% ? I would like 256 (8 bit) steps, but if this is not possible, at least 64 steps per PWM.

I would use the 2nd chip to decode the transmitter signal using EXT int and I need to relay the value for each PWM to the second chip. This would be 1 way communication. I can send each value seperately or as a string and decode the string on the PWM chip. Any ideas how I can do this? I thought about using software UART, but not sure if the PWM chip can receive the data AND do the software PWM well.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group