PIC PWM registers

Hi,

I wrote a PWM calculator and code generator :

formatting link

This may help anyone fighting with PIC PWM registers calculations...

Questions & comments are welcome

Bruno

Reply to
BrunoG
Loading thread data ...

I tried it and the code window was blank.

Specs were: 4MHz, 400Hz and 50%.

Al

Reply to
Al

"Al" a écrit dans le message de news: snipped-for-privacy@news.verizon.net...

Hi Al,

I tried with your specs, this is what you should have got :

/*

  • PWM registers configuration * Fosc = 4000000 Hz * Fpwm = 400.64 Hz (Requested : 400 Hz) * Resolution is 10 bits * Prescaler is 16 * Ensure that your PWM pin is configured as digital output * see more details on
    formatting link
    * this source code is provided 'as this', * use it at your own risks */ PR2 = 0b10011011 ; T2CON = 0b00000111 ; CCPR1L = 0b01001101 ; CCP1CON = 0b00111100

the calculator uses advanced javascript functions, I tried with the latest release of IE, Opera and Firefox. Is your navigator up to date ?

Thanks,

Bruno

formatting link

Reply to
BrunoG

Très bon.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

Hi Bruno,

white text on white background doesn't look good in the source code window....

greets, Wolf

--
From-address is Spam trap
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

"Wolfgang Mahringer" a écrit dans le message de news: ixo6g.14$ snipped-for-privacy@news.salzburg-online.at...

Hi Wolfgang,

It seems that some browsers do not apply the black background color from the tag correctly, so I removed it, and font tag too.

the code is now printed black on a white background, and should be convenient for all users.

Thanks ;-)

Bruno

formatting link

Reply to
BrunoG

"Spehro Pefhany" a écrit dans le message de news: snipped-for-privacy@4ax.com...

;-)) Thanks !

Bruno

formatting link

Reply to
BrunoG

BrunoG scrobe on the papyrus:

I'm using Opera version 8.51 and I still don't see any code only a large table of values. Where should I be looking for the code listing?

--
John B
Reply to
John B

formatting link
ml

Looks good, thanks. Is there something similar for the USARTs, and other things requiring multiple register settings where it is so easy to make a mistake? Bob

Reply to
Bob Eld

"Bob Eld" a écrit dans le message de news: mOp6g.67355$F snipped-for-privacy@newssvr29.news.prodigy.net...

Hi Bob,

It's a little bit different for USART but I'm thinking about it ;-)

Thanks,

Bruno

formatting link

Reply to
BrunoG

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.