Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Increase PWM frequency with 68HC11 ??

Status
Not open for further replies.

Mr.Cool

Advanced Member level 2
Advanced Member level 2
Joined
Jun 20, 2001
Messages
664
Helped
87
Reputation
178
Reaction score
60
Trophy points
1,308
Activity points
7,111
pulse width modulation hc11

I am using a 68HC11 microprocessor to control the switching element in a Boost Converter application. however, the maximum frequency capable of the 68HC11 is not even close to being what i desire.

68HC11 max frequency is based on the crystal frequency, mine is 4MHz. so using 8 bit PWM resolution, i can obtain somewhere around 15KHz max frequency. i require upwards of 60KHz.

i do not want to switch microcontrollers. i can not run the 68HC11 faster (i.e. i can not exchange the crystal).

can anyone suggest a method that i may achieve faster switching PWM ? i am open to suggestions or web links describing off-board analog circuitry that performs high frequency PWM that is , somehow, controlled by the slower movuing 68HC11. schematics here would be a great help.

thx
Mr.Cool
 

overclock hc11

ok, answering my own question ....

i think this device would work:

h**p://focus.ti.com/docs/prod/productfolder.jhtml?
genericPartNumber=UC3524

this PWM generating IC depends on an analog voltage to control it (up to 300KHz or something rediculous). of course, the 68HC11 does not have Digital -> Analog output pins... BUT, you can create PWM signal on an output pin, low-pass filter the PWM and ::poof:: you have an analog signal (which can be changed by modifying the PWM duty cycle).

Mr.Cool
 

increase the frequency of a pwm

For 8 bits and 4MHz busclock (crystal is 16MHz):
Max PWM frequency= 4000000/256=15625Hz.
No way to achieve higher frequency without lowering of resolution.
For 60KHz PWM period should be 4E6/60k=66-67 ticks of E-clock or
little more than 6 bits of resolution.

For 8 bits & 60kHz PWM you need 15.36MHz bus clock or
HC11 with 61.44MHz crystal. No PIC16or18 controller exists for such
PWM speed :).

Good luck
 

hc11 analog output

get it too run on a pic platform

and peek the speed avalible using a senix{ubicom chip}

so you see there is a pic that totaly outperforms all the others

running at a core speed of 75 / 4

if you take 4 /75 youll get the single ins time 54ns for 1 ins process


so this will give you more than enough overhead to get a stable high res routine
{debug the routine internal to the chip then it is easy to adjust loops and times etc to get the pattern correct and linear stepping} first use a routine you made to run slowly on a pic .. its lots easier



i am sure youll get what you need

an sx18 will give enough ... power

so.....
 

how to increase the frequency of a pwm output

i decided to go with the PIC chip method and drop the 68HC11 all together. the pic chip of choice is the 16F877 with 20MHz crystal. with a prescalor of 1:2 (is this the smallest?) i get an E-clock of 10MHz. this is some 5 times more fast than the 6811 with a 2MHz E-Clock.

therefore, my max PWM speed should be 15KHz * 5 = 75KHz.

goal achieved

my only problem now is that PIC chips are hard to learn!!! BANK1/0 memory, what's that~!? hahaa

Mr.Cool
 

maxx pwm

i will explain banks to you and registers

TRIS is too set the register by like sloting in a program card


of bits I or O 1 or 0

this value is moved into the tris {basicaly a static variable}
by the movlw B'11100000' binary string
and setting eact port in the order you need changing to the bank you want to tris next
finaly finishing with the one you want too use first {usually the one you started and tris first.....

memory ports are the same for eeprom and also external
the hard part comes from i2c etc
so use some premade routines from the microchip site



w is a temp register for moving data


depending on how you tris'd port's select string depends on the order of int and read write routine execution

so abcde is optimum
but it depends on realy the order your it goes about its routine

and ports in memory are the same as ports in registers
access by priority of needs

so bank 1 can never be bank 0 etc at the same time

to avoid colussions

each port is set lower or higher at a point in the natural hirachy of the registers and ports {given a perfect single cycle operation routines setup}

nice too see you got it hammered out ok...

pulse scaller is the way
well done
 

frequency of pwm on 20 mhz crystal

Mr.Cool said:
i decided to go with the PIC chip method and drop the 68HC11 all together. the pic chip of choice is the 16F877 with 20MHz crystal. with a prescalor of 1:2 (is this the smallest?) i get an E-clock of 10MHz. this is some 5 times more fast than the 6811 with a 2MHz E-Clock.

therefore, my max PWM speed should be 15KHz * 5 = 75KHz.

goal achieved

my only problem now is that PIC chips are hard to learn!!! BANK1/0 memory, what's that~!? hahaa

Mr.Cool

1. HC11 with 2MHz Eclock can generate in best case 7.8125kHz PWM
output with 8bits of resolution, not 15kHz. + It hasn't hardware PWM
generator -so it's difficult to generate outputs for near to minimum and
maximum output values. 2kHz sounds more real.


2. Max PWM source clock for 16F877 (20MHz crystal) is 5MHz and for
8bit resolution you can get 5e6/2^8=19531.25Hz Max PWM frequency.
For 60kHz PWM you can get 5e6/60k=83.3 max PWM period value
or 6-7bits of resolution. No way to make it better. Can you
overclock PIC16F877 to 61.44Mhz crystal clock(15.36MHz bus clock)?

I don't know if Scenix has hardware PWM. If no for software
PWM 8bits*60kHz it should have 20-30MHz of busclock if you want
full range of output 0..255.
 

68hc11 schematics

thx for the tips SIMBOX. unfortunately i am not familiar enough with PICs to understand 90% of what you wrote! ha. i will refer to it later after i do more reading.

i am using Pic Basic Pro (V2.42) as the compiler with microcode studio as my editor. i am understanding that the bic basic pro will handle all of the Banking issues (fingers crossed) and so i need not know how they work.

i see now that the PIC can not achieve 60KHz :(

according to : h**p://w*w.3base.net/produkter/komponenter/pic16f877.php
Maximum PWM frequency @ 8-bit resolution = 32 kHz, @ 10-bit resolution = 8 kHz

hmmm.... maybe 32K will be fast enough.. it is after all to control a switching element in a boost converter (DC-DC).

Mr.Cool
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top