Binary Clock from Highschool, Lost code PIC18f2525

Thread Starter

stobby

Joined Jun 20, 2018
36
It would appear i missed some previous posts last night, I must not have refreshed the page before posting.

To answer those posters,

@AlbertHall - Yes there is also an external power source via the red and black wires +5VDC.
And Yes it is read horizontally.

@jpanhalt - As i have many of this particular chip the 'original' was lost many years ago. This is a brand new chip.

@AlbertHall - I have access to both the XC8 Compiler and MPLAB X IDE, Whichever is easier.

Kind regards Brent.
 

AlbertHall

Joined Jun 4, 2014
12,625
I have access to both the XC8 Compiler and MPLAB X IDE, Whichever is easier.
Here is a test version. The buttons won't do anything. The time should count up correctly from 00:00:00 to check that I have the LED wiring correct. You will need to change the extension from .txt to .c before loading it into the IDE/XC8.
 

Attachments

Thread Starter

stobby

Joined Jun 20, 2018
36
@AlbertHall Thank you For taking the time To compile that code for me, It is greatly appreciated.

There are however some issues. The 'Seconds' Row of leds are all lit up and sort of flickering,
The 'Minutes' Row is acting more like 'Seconds'
The 'Hours' row is like 'Minutes.
It was however quiet satisfying just to see it light up. :)

I have Recorded a short video so you can better see whats going on.
Could i Possibly E-Mail you the video?

Thanks, Brent.
 

AlbertHall

Joined Jun 4, 2014
12,625
Here is a test version. The buttons won't do anything. The time should count up correctly from 00:00:00 to check that I have the LED wiring correct. You will need to change the extension from .txt to .c before loading it into the IDE/XC8.
Here's a corrected version - I neglected to set pins as digital instead of analog!
I don't know whether this will fix the problems you see but there's only one way to find out.
 

Attachments

Thread Starter

stobby

Joined Jun 20, 2018
36
@AlbertHall , Thanks for the update, Finally got around to testing it.

Unfortunately the result is the same as the original though. As i mentioned previously it may be easier for you to diagnose if i can E-Mail you the video. or if there is some site i can post it too?

I would like to be able too Compensate you for your time and effort, A small donation?

Kind regards, Brent.
 

AlbertHall

Joined Jun 4, 2014
12,625
@AlbertHall , Thanks for the update, Finally got around to testing it.

Unfortunately the result is the same as the original though. As i mentioned previously it may be easier for you to diagnose if i can E-Mail you the video. or if there is some site i can post it too?

I would like to be able too Compensate you for your time and effort, A small donation?

Kind regards, Brent.
Check your conversations.
 

jayanthd

Joined Jul 4, 2015
945
I can provide you a fully working C code for mikroC PRO PIC Compiler. I have an extra licence for it and I can give it to you for free. If you are intereste then email at jayanthd2k12(at)gmail(dot)com

I have Proteus and I can simulate your circuit.
 

Thread Starter

stobby

Joined Jun 20, 2018
36
I think it was running at 8MHz clock and not switching to the 32kHz oscillator!
Try this one:
Thanks so much for your help and dedication, it worked Perfectly. And also thanks to everyone else that helped throughout this whole thread. this is truly a fantastic community. couldn't be happier. If i can help anyone with anything drop me a line.

Kind regards, Brent.
 
Top