PDA

View Full Version : Tachometer code problems.



PICy
- 29th October 2004, 17:39
Hello.

My ebay purchase came through the door this morning - A PIC programmer & PICBasic Compiler v1.44 :-)

After a lot of confusion i managed to get PBC working with CodeDesigner Lite, but i havent managed to get much further!

I have done a lot of programming in the past, and the samples i have read shouldnt be too hard to get my head around.

My first project (after the blinking light etc) is to make a tachometer. I have been reading up and think that 'pulsin' will be the best way to go, but im not sure. I am a little confused as half of the resources i have found for 'PICBasic' have either returned PBP, or other types of PICBasic. e.g. i spent a while reading up on variables, 'Dim myvar as Byte' and 'myvar VAR BYTE' didnt work, it took a while for me to realise that it probably wasnt my fault! Also, many people making tachometers have used a 'Count' command, but i dont think that exists in PBC either!

My questions are basically;

*Would pulsin be the best thing to use?
*Are variables just refered to as B0, W1 etc? (using 'Symbol' to name them)
*What happens if a number is too big to fit into a variable? Will the number overflow into the next var, or will only the left hand side be stored?


Thank you for your time!
PICy



P.S. Is it just me, or can nobody post in the mel PIC BASIC board?

The posting problem is noted... for the time being, this thread is still resident in the General section for anyone wishing to reply - Melanie

lester
- 30th October 2004, 19:17
Posting in the mel PIC BASIC forum is now possible.

You were the first to mention it so i had no idea it was locked out!

PICy
- 30th October 2004, 21:54
lol. If i was the first to notice, then I wonder how long it will be before someone posts in here next!

BiscutWheels
- 28th January 2005, 16:29
I just made one for our SAE formula car. I used the pulsin and it worked fine. I also used another chip with the pulsout command to simulate the ECU tach output, worked great.

Nate