Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | 18F4331 and PWM

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

18F4331 and PWM - Paul L - Mar 21 20:40:39 2007


Hi.

Well, after getting my new PIC, it didn't take long to get it going! Was a little worried at first! I can now receive using USART and then using the values taken put that in the PWM unit and there i have a dimming LED! Beats having a DA and few Op-amps!

My question is about the PWM maths. I have read the datasheet but can't figure out how to calculate the frequency of the PWM. Maybe cause its 12:30 in the morning! Can anyone point me in the direction to an equation to figure this? It is working, well, at first i set all the prescaller to max so got a flashing LED rather than a dimming! So upped the pre and got a good dim! Just would like to figure the freq.

Cheers,
Paul


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: 18F4331 and PWM - Paul L - Mar 22 18:16:07 2007

Hey

I have managed to figure out most of the PWM stuff but am still in need of a little help. I am using the Power Control PWM Module on the PIC18F4331, i have managed to get the frequency from the calculation on the datasheet, it wasn't 100% clear cause couldn't figure out what PTMRPS was, but it turned out to be the Prescaler! Anyway, i have tried using the PWM Resolution equation, but i can't seem to get the same answers as the example table, i have not done a lot with LOG but just used it on the calculator. I don't seem to get the correct Resolutions? Do anyone have any experience on the PWM side of this PIC? Help would be great! Cheers
----- Original Message -----
From: Paul L
To: p...@yahoogroups.com
Sent: Thursday, March 22, 2007 12:40 AM
Subject: [piclist] 18F4331 and PWM

Hi.

Well, after getting my new PIC, it didn't take long to get it going! Was a little worried at first! I can now receive using USART and then using the values taken put that in the PWM unit and there i have a dimming LED! Beats having a DA and few Op-amps!

My question is about the PWM maths. I have read the datasheet but can't figure out how to calculate the frequency of the PWM. Maybe cause its 12:30 in the morning! Can anyone point me in the direction to an equation to figure this? It is working, well, at first i set all the prescaller to max so got a flashing LED rather than a dimming! So upped the pre and got a good dim! Just would like to figure the freq.

Cheers,
Paul



(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )