Reading a clock pulse

Pekari

Senior Member
I have clock pulse in PICAXE 18X pin 6. How I can read it? I have tried a command button 6,1,1,1,b2,0... but it doesn't give a any value (I haven't use command button ever before).

Vsupply=4,5...4,8V
VClock=1,2...1,4V

Clock pulse time is about 0,2 sec every 2 sec. (Wall clock equipment).

Is there any other way to read a pulse?
 
Last edited:

Dippy

Moderator
PEKARI,

It would be best to start a new Thread for your question.

If you'd read the thread then you'd see that your clock pulse is TOO LOW to be read by PIC at PICAXE V+ of 5V.
You could use transistors, op-amps, v-comps to level shift the voltage to an acceptable-to-PICAXE voltage.

In code you can use conditionals, Pulsin or Interrupts on the pin once the clock pulse is at a sutiable level.

I'll leave others to draw you a picture and provide you with examples.

IS THIS a school project??

(To:- Mods-with-spare-time: Maybe move this to a separate thread please)
 
Last edited:

Pekari

Senior Member
Thanks your fast reply. It is very easy to do with transistor, but I afread board is too little to do that. But maybe I have to try to do it.

No, it's not a scool project, why it should be?
 
Last edited:

Dippy

Moderator
Have you tried running PICAXE at a lower supply voltage?
Not too sure how low it'll go. Give it a try. Have a go.

READ the first few posts on this thread to give you some idea of logic (TTL/Schmitt) thresholds for the chip you are using. To find out which inputs are TTL and which are Shmitt you will have to read the the Microchip Data Sheet on the PIC you are using. The Data Sheet IS LONG, but the info is on Pages 3, 10 and 11 and read it in conjunction with PICAXE device pinouts in the PICAXE "Getting Started" manual 18X pinouts.

I realise people will post you the answer here, but reading it is an education and will benefit you for future projects. Spend 10 minutes now, it's worth it. Honest :)
 

Pekari

Senior Member
No I need high voltage because in this project, I need good input quality to other ADC inputs.

Thanks, now this clock pulse is working, I take a transistor to rising voltage and it is used by command "button".
 
I had a similar problem reading a pulse width from a radio control receiver. The OpAmp and the transistor solutions worked. There was no room in the board so, the solution was an in-line diode in the 5V power supply to the Picaxe. It droped the 5v to about 4.3V and solved the problem. I included the diode in the supply wire so I did not have to do anything to the board.
 
Top