Re: 16f628a timer
Hi,
Ok can see the kind of thing you are aiming for so will try and steer you in the right direction.
You say you have some hardware, can I ask what that is, paricularly what programmer you are using.
As I mentioned before there are several good tutorials online, which may not be doing exactly what you want, but they do share many common elements - here is a good one using the same chip
http://www.winpicprog.co.uk/pic_tutorial.htm - a local guy just down in Derbyshire.
For your actual code, it is really just the working bit of the whole program, so this is what you need to do to try and turn it into a useable program.
First off open the 16F628A.asm Template file, this is a precoded starter file -you will find it in the microchip/mpasm_suite/Templates/Code directory.
Your code will drop into the Main area of that template.
What I would suggest you do, is for now leave out your delay function, that will overly complicate things while you get to grips with everything.
You have the switch inputs and the leds output - well thats a great starter program - make switch 1 when pressed turn on led1, and so on for the others.
Before you can use the ports, you need to set them up, that is you must specify if they are to be inputs or output and also for PortA you need to tell it if they are to be Analogue or the Digital ports your need.
Have a read at the datasheet port section.
Others may give you the code, but I won't until you are stuck, otherwise you will never learn - it seems difficult at first but it will suddenly alll drop into place - and thats a grand feeling.