![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
Hi Everyone,
I've been reading Nigel's tutorial and I now understand how to operate the hardware PWM in the PIC that I wish to use (18F2431). My question is, once I set all the required registers for hardware PWM, does that continue to use processor cycles like a software pwm? ... I'm not sure I'm being very clear, but what I mean is, if I am reading a keypad and displaying to an LCD as well, will this disrupt the operation of the pwm? I have a couple of days off before I start my university exam revision for the semester so I thought I'd "restart" the project again... As a result, I'm sure I'll have a few more questions, it might be relatively obvious but I've never used a PIC before... I don't know whether this was a good project to start with, I thought the hardware PWM would simplify my life, but it seems to have complicated it for the moment... Thank you, EroSennin.
__________________
What is a joule per second? |
|
|
|
|
|
|
(permalink) | |
|
Quote:
__________________
search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) |
||
|
|
|
|
|
(permalink) |
|
Excellent, that's what I meant! Thanks.
Now it's time to start meshing together the various aspects...
__________________
What is a joule per second? |
|
|
|
|
|
|
(permalink) |
|
One thing I use extensivly with PWM, is the ability to change the PWM and duty cycle on the fly
The developer of Swordfish released a module called PWM.bas and allows the user to change PWM settings like so; Code:
// import PWM module...
Include "PWM.bas"
// local duty variable...
Dim Duty As Byte
// main program...
SetFreq(5000)
While true
Duty = 0
Repeat
SetDutyPercent(Duty)
Inc(Duty)
DelayMS(10)
Until Duty > 100
Wend
__________________
Spency. PIC Micro's - Your mind is the limit PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net |
|
|
|
|
|
|
(permalink) |
|
Hi Gramo,
I saw you reply to a post I had made about Colour Sensing, and clicked around the site you have in your signature. It looks pretty nice, so I've joined it... I'm about to write a post haha, this doesn't mean ETO that I will ditch you... I promise. Well basically, for what I want to do, there are 3 PWMs and the user will enter the required duty from 0 to 255, and each controls the brightness of a series of RGB leds... Thank you for your advice.
__________________
What is a joule per second? |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| PI controller using PIC18F | elec123 | Micro Controllers | 17 | 3rd August 2008 09:45 AM |
| Error on AN0 PIC18F | mikesmixes777 | Micro Controllers | 10 | 8th February 2008 06:28 AM |
| PIC18F & C Programming | mikesmixes777 | Micro Controllers | 2 | 22nd November 2007 09:00 AM |
| PIC18F & Microchip C18 | yngndrw | Micro Controllers | 7 | 24th August 2007 03:25 AM |
| PIC18F and GOTO $-6 | yngndrw | Micro Controllers | 12 | 3rd August 2007 01:09 AM |