Post Reply 
BASIC and PIC
Author Message
PSPkiller
*The Sweaty Indian/Welsh Guy*

Posts: 2,393.2167
Threads: 251
Joined: 24th Jun 2007
Reputation: 0.56947
E-Pigs: 53.7911
Offline
Post: #1
BASIC and PIC
The story is as follows:

For school I have to write a program in BASIC to run on a PIC chip. I've chosen to write a program that controls a railway crossing. One of the features of the system is that it counts how many trains have passed over the crossing. When the counter reaches 1000 it will turn on an output warning that the crossing needs maintenance.

My problem is:

How the hell do I program it to check if the counter has reached 1000. I've worked out how to add 1 to the counter for every train that's passed, and how to reset the counter when an imaginary maintenance man comes and presses a button, but I can't work out how to check the number in the memory address allocated to the counter.

Anyone? Does anyone here even know BASIC?


PS the PIC chip is a 16C84 (DATASHEET)

[Insert Signature Here]
15/04/2009 05:56 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
BASIC and PIC - PSPkiller - 15/04/2009 05:56 AM
RE: BASIC  and  PIC - Mc Cabe - 15/04/2009, 06:50 AM
RE: BASIC  and  PIC - Mythos - 15/04/2009, 07:26 AM
RE: BASIC  and  PIC - feinicks - 15/04/2009, 08:17 PM
RE: BASIC  and  PIC - ZiNgA BuRgA - 15/04/2009, 08:44 PM
RE: BASIC  and  PIC - PSPkiller - 16/04/2009, 05:01 AM
RE: BASIC  and  PIC - dedat - 16/04/2009, 05:07 AM
RE: BASIC  and  PIC - boogschd - 16/04/2009, 06:28 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: