Overclocked
Member
ADD: Code Works, was a hardware mistake
It will display 8 or 9 If I manually set digit to 8 or 9, But It wont count past those two numbers. It will Count up to seven and just skip those two numbers. Everything is hooked up properly, since Ive tested each individual digit and they all light up. Im using 4 LEDs as my output indicator.
Code:
Device = 18F1320
Clock = 4 // 4MHz clock
Config OSC = INTIO2, WDT = OFF, LVP = OFF
//includes go here
//Vars Go Here
Dim Digit As PORTA
TRISA = 0
OSCCON = $62 // select 4MHz internal clock
ADCON1 = $7f //all digital
//program start
While True
For Digit = 0 to 9
Select Digit
Case 0
Digit =%0000
Case 1
Digit = %0001
Case 2
Digit = %0010
Case 3
Digit = %0011
Case 4
Digit = %0100
Case 5
Digit = %0101
Case 6
Digit = %0110
Case 7
Digit = %0111
Case 8
Digit = %1000
Case 9
Digit = %1001
EndSelect
delayms (1000)
Next
Wend
End
It will display 8 or 9 If I manually set digit to 8 or 9, But It wont count past those two numbers. It will Count up to seven and just skip those two numbers. Everything is hooked up properly, since Ive tested each individual digit and they all light up. Im using 4 LEDs as my output indicator.
Last edited: