Replace timer 555 for 08M2

cavch

New Member
Hello

Can I to replace timer 555 for 08M2 to obtain a frecuency between 20 to 200 KHz with two outputs Q and NOT Q ?

Thanks for your help
 

premelec

Senior Member
CD4060?

Please be more specific what you need to do... for instance does the circuit output need to drive a resistive load? or inductive load? Perhaps a CMOS 4060 would do what you want...
 

AllyCat

Senior Member
Hi,

Possibly, but we really need more details, and probably not by using only the "normal" PICaxe Basic commands and User Manuals. Therefore, it's certainly not "easy".

Firstly, the 555 is a moderately "High Voltage, High Current" analogue chip, so can deliver a "continuously variable frequency" (using a variable resistance) up to 12 volts amplitude, or more. The PICaxe (using internal code) can only change the frequency in "steps", with outputs up to about 5 volts and 20 mA.

To get 200 kHz you would need to use a PWM output and the 08M2 has only one (Pin c.2 = Leg 5). For the "Not Q" signal output, you then need to find an on-chip inverter (to invert the signal output on c.2). There are several possibilities, e.g. an analogue comparator or the S-R Latch, but both of these also use (only) the c.2 output pin (or Leg 2, the programming input, which also is not available).

Therefore, the only internal hardware I can think of is the "Data Signal Modulator", which has its output on Leg 7 (the programming output), not very convenient, but "possible". The DSM is not directly supported by PICaxe Basic, so you would need to use POKESFR commands, and reference to the "advanced" Microchip Base PIC data sheet here.

Cheers, Alan.
 

hippy

Technical Support
Staff member
The answer may be 'not as easily as it would be to use an actual 555'.

It may depend on what resolution or frequency steps one desires between 20 kHz and 200 kHz, whether you want a fixed frequency within that range or one which varies. The PICAXE can only generate certain frequencies using PWMOUT, and 200 kHz is too fast to bit-bang.
 

erco

Senior Member
It's amazing to consider that the 555 timer (designed in 1971) is still in popular use and unbeatable for certain applications. The designer of the 555 just passed in 2012, and can certainly rest in peace that he made such a fine and lasting thing.

https://en.wikipedia.org/wiki/555_timer_IC

https://en.wikipedia.org/wiki/Hans_Camenzind



From: http://makezine.com/projects/projects-in-motion-control-three-types-of-motors-with-555-timers/

With an estimated one billion 555 timers manufactured annually, you know this component must be versatile!
 
Last edited:

oracacle

Senior Member
I always find it intriguing that early designs perpetuate through time by comparison to new tech.
Alas with this subject I would consider a 555 with transistor invertor, simple and effective.
 

premelec

Senior Member
@erco - I recall Don Lancaster predicting it's demise several decades ago since the new micros were so easy to program... ;-0
 

erco

Senior Member
Digital isn't necessarily better than analog. Take DTV for instance. More channels and clearer picture, but still the same junky TV programs! :)
 

oracacle

Senior Member
its funny you bring up aircraft, the "most up to date" aircraft in the US inventory, the F22 was primarily designed during the 90s and still uses processors that run at around 25mhz - its been a pain in the backside to interface to modern weaponry.
 

inglewoodpete

Senior Member
The answer may be 'not as easily as it would be to use an actual 555'.

It may depend on what resolution or frequency steps one desires between 20 kHz and 200 kHz, whether you want a fixed frequency within that range or one which varies. The PICAXE can only generate certain frequencies using PWMOUT, and 200 kHz is too fast to bit-bang.
It would be worthwhile doing some tests with hSerOut on the 08M2. If you just want a square wave output (Ie for frequency), then sending 'U's in a tight loop could give reliable frequencies up towards 1MHz. For instance 'hSerSetup 32, %10000' gives 250kbits/s with the 08M2 running at 32MHz.
 
Top