samsam_91
Newbie level 1
- Joined
- May 10, 2014
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 15
Hello everyone
I found you guys the best website have a good information and supporting members , so I hope you can help me in this simple project that requested from me in the college
I`m using a PIC18F452,
The coding by BASIC "Proton IDE"
the goal of project is "make a counter of 3 digits count to 999 and there's a 3 switches 1 make an up counting 2nd make a down and 3rd stop or held this operation "
I made the code and I got some errors in 7 seg reading
there is the code
and the circuit
*** And I just want to know is the error in coding or the circuit ??
Thanks,
I found you guys the best website have a good information and supporting members , so I hope you can help me in this simple project that requested from me in the college
I`m using a PIC18F452,
The coding by BASIC "Proton IDE"
the goal of project is "make a counter of 3 digits count to 999 and there's a 3 switches 1 make an up counting 2nd make a down and 3rd stop or held this operation "
I made the code and I got some errors in 7 seg reading
there is the code
Code Basic4GL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 Device 18F452 XTAL 4 ALL_DIGITAL 1 Dim X As Byte Output PORTD Output PORTA Dim n0,n1,n2,d0,d1,d2 As Byte label: For d2=0 To 9 Step 1 For d1=0 To 9 Step 1 For d0=0 To 9 Step 1 For X=0 To 40 Step 1 PORTA=%11011111 n0=LookUpL d0,[0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90] PORTD=n0 DelayMS 10 PORTA=0xff n1=LookUpL d1,[0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90] PORTD=n1 PORTA=%11101111 DelayMS 10 PORTA=0xff n2=LookUpL d2,[0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90] PORTD=n2 PORTA=%11111111 DelayMS 10 PORTA=0xff Next X Next d0 Next d1 Next d2 GoTo label End
and the circuit
*** And I just want to know is the error in coding or the circuit ??
Thanks,
Last edited by a moderator: