Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Timer Project

Status
Not open for further replies.

kaupy

New Member
Hi, new to the forum. I have taken an interest in microcontrollers recently and I 'm currently reading up on everything about them. I would like to build a timer project that simply displays a count of 1 to 999 on a screen. Preferably through USB or HDMI. The numbers displayed must be green until 120 and then change to red. The count is to be reset with a push button. Is all of this possible? Or is it to big a problem.
any advice would be greatly appreciated.
 
Possible yes, but too much for a beginner project.
Counter is easy.. serial (usart) communication is the first step in communications.. Start with those. Forget the display, USB and HDMI for now.

What kind of microcontroller you think you want to use?
 
I've got a timer program for a 16f but not sure if an 18f would be better. I know I 'm starting a bit late in life, but I would like to achieve something before I get too old. I have been in the mechanical industry most of my life and I did have a dabble in programming years ago but ended up having to drop it for my kids. I thought for the timer project it would be easier to simply use a raspberry pi but programming it to do what I want has proved to be a nightmare. So, now, I'm thinking if I can print a countdown on an LCD screen 16 X2 , then I should be able to display the output on an LCD TV. SORRY that was a mouthful!
 
Hi,

Age is not a problem, there are many pensioners in this and other forums, its a popular pastime for us oldies !:)

The 16F chips will serve you well and are well supported on the web, the 18F generally better but not dramatically.

What complier are you looking to use, C or Assember; look at the Sticky at the top of the forum to links to various tutorials aimed at beginners.

A few popular links here.



http://www.gooligum.com.au/tutorials.html

https://www.electro-tech-online.com/articles/nigel-goodwins-tutorials-in-c.467/

http://www.amqrp.org/elmer160/lessons/

http://www.epemag.wimborne.co.uk/resources.htm

http://www.mikroe.com/chapters/view/5/chapter-4-timers/
 
Not to dissuade you, but if you worked in industry you might actually want to look into ladder logic and PLC's, but that doesn't mean to give up programming as a hobby. Programming experience in any language is worth its own weight in gold no matter what your doing.

Personally I use the 18F series and Swordfish SE.
https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=Main.HomePage

As for the programmer I use the Pickit 2. Ive looked at the Pickit 3 but I have no need for it (yet).

UART to USB is actually quite easy using cheap modules these days. But you have to walk before you can run these days.
**broken link removed**

Also you probably wont be able to use hdmi with a PIC, atleast without going to 32 Bit. You would need a raspi for that.
 
UART to USB is actually quite easy using cheap modules these days. But you have to walk before you can run these days.

Well, UART to USB is still only UART from the application point of view. You don't even need to buy IC modules for it.. just buy a cable with the module embedded: https://www.ftdichip.com/Products/Cables/USBTTLSerial.htm.

True USB is completely different beast. So, if we talk about USB, it has to be true USB.. otherwise we need to talk about UART. Lets not get mixed up here.

UART (rs232) is always device-to-device and can be full-duplex where both devices can send and receive at the same time. USB is master-slave deal where the master initiates all communication and is precisely timed.. You can even use USB to calculate time.
 
Last edited:
I've got a timer program for a 16f but not sure if an 18f would be better. I know I 'm starting a bit late in life, but I would like to achieve something before I get too old. I have been in the mechanical industry most of my life and I did have a dabble in programming years ago but ended up having to drop it for my kids. I thought for the timer project it would be easier to simply use a raspberry pi but programming it to do what I want has proved to be a nightmare. So, now, I'm thinking if I can print a countdown on an LCD screen 16 X2 , then I should be able to display the output on an LCD TV. SORRY that was a mouthful!

Getting started is the difficult part.. after that you can start enjoying. Google for tutorials etc.
16x2 LCD is nothing compared to LCD TV. 16x2 LCD is simple, but for TV you need really powerful processor.. ARM cortex etc. well, Raspberry PI does that. The PI is a good choice anyway, ARM is the future and 8-bit controllers are dying. Program in C if you want to get something done. If you go for ASM, you'll never get to display anything on LCD TV.
 
Last edited:
All very good information thanks. I have been looking into C++ . I know there are differences between C++ and C . So far all reference to microcontrollers has been C (as well as asm). It seems that every time a version of python is upgraded, programs written in previous versions won't run. So I think I need to jump into C and stick with it.
 
Status
Not open for further replies.

Latest threads

Back
Top