I'm working on a school project, and this is the first time the course has been taught at my small university. Naturally, the professor is from the Apollo age, and the TA isn't too much help.
Using a PIC16F88, I want to make a simple program that illuminates an LED and displays a count from 0-9 on a small 7 segment LED display that increases each time the LED flashes. I have the ability to write this type of code, but my main goal is to insert a pause in between the LED lighting up and the counter increasing. I want this pause to be random, and if the pause duration is <= say, 900, the program goes to a Sub that prompts the user to manually reset the program and begin again.
I have been able to somewhat get an idea of how to generate a random byte using the resources on the forum already.
Something like...
MyWord var Word
MyByte var Byte
Random MyWord
MyByte=(MyWord//9)+1
pause (Mybyte * 100)
If (Mybyte == 9) Then
GoTo errorloop
Endif
Is this type of math operation allowed when using pause?
Bookmarks