Digital Clock

Discussion in 'The Projects Forum' started by sykesy10, Mar 21, 2013.

  1. sykesy10

    Thread Starter New Member

    Mar 21, 2013
    2
    0
    I have recently brought this Digital LED clock kit and after soldering it up i am trying to figure out how it works. I know how digital LED clocks usually work but i cant figure out how this one does specifically. It can run of the AC source (50HZ) or the oscillator, there is a trim capacitor to fine adjust the timing given from the oscillator. There is no counters or anything to gear down the 50 HZ frequency? But there is a pre programmed chip so is this where the frequency will be ramped down? Also unsure as to the parts that the transistors capacitors and resistors really due other than to provide the correct voltage for the rest of the circuit.

    Ive attatched a picture of the circuit and the manual were the components can be seen.
    Anybody fancy lending a helping hand?
    Thanks
     
  2. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Yes. And wouldn't it be interesting to see the source code?
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    There is nothing unusual about this design. The clock is designed to operate from batteries or AC power source. When operating from batteries, a quartz crystal oscillator connected to the chip is used to drive the chip. The oscillator frequency is counted down by the chip to provide the time-keeping time-base.

    When the clock is powered from AC mains, power is derived from the AC. The AC mains frequency may or may not be used as the time-base.

    The LED digits are connected in a multiplexed arrangement. The transistors are used to enable one digit at a time in the multiplexing scheme.
     
  4. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
    There is what looks like a faint Microchip logo at pin 3. Based on the 18pin package, GND at pin 5 and the oscillator hookup at pins 17-18, it looks like a 16F84 or similar. FWIW
     
  5. edwardholmes91

    Member

    Feb 25, 2013
    181
    18
    It's useless... unless there is some way of downloading the program from the chip back to a PC? I have tried contacting Velleman in the past relating to information about the coding etc and they wouldn't budge because they thought that I was trying to copy their design.

    I did question how it was supposed to be a learning package if they didn't tell you how it worked and it simply because a soldering exercise if they just supplied the parts and assembly instructions, but this didn't provoke any response from them, they simply said it was against company policy to provide specific details of how a circuit worked.
     
  6. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    The printed instructions say PIC16C54C
     
    JohnInTX likes this.
  7. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    That's what I was thinking.
     
  8. edwardholmes91

    Member

    Feb 25, 2013
    181
    18
    Out of interest, is there a way of getting a program off a PICAXE?
     
  9. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,024
    Serves me right for not reading more carefully! Thanks.
     
  10. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It takes two hours or less than that to write such a program in C language.

    Office lady excuses.

    There is nothing super secret about such circuits, some of them are well known. To beginners of course they remain a mystery.

    SEGA some while ago charged a premium for their dev kits, really 10,000s of dollar. To some degree this made open source and LINUX attractive to people in the first place originally.

    All these ROMs have been hacked, emulators were produced, you could find them even nowadays quite easily if you really wanted to.

    I saw the programming spec. for the Master System, encountering the seals and the CONFIDENTIAL stamp I had no further wish to deal with it at all.

    Be it- in 2004 I actually bought a Velleman kit (for PIC programming), including a schematic. Most kits I ever saw include a schematic.

    If you see people selling preprogrammed chips, it is not so unlikely there is not so much in it. And it is also likely assembler was used here.

    Think of the Microchip USB stack (1000s of lines C). Would it make sense to sell this as "preprogrammed chip"? Or would it make sense to try to fabricate a knock-off? As it is free anyway.

    You can compare this to the GIF licensing controversy which has caused a large amount of unbill over the years already.

    I do not think it is a sustainable business model. People will only start to say things about that, and will try to use something else.
     
  11. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It is done in software. The preprogrammed chip is a small computer actually with a FLASH memory.

    Then a 7-segment decoding scheme is used.

    If you wanted to understand how it works, you'd have to learn about microcontrollers.
     
  12. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Not that anyone has been able to figure out. Thus, all code is "protected" once it is in the chip.
     
  13. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    The 16C54C is not a flash memory chip.
     
  14. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Yes but most PICs are now using FLASH technology.

    It is correct in so far as it is indeed not reprogramable.

    Wanted to mention it, but then didn't.

    All these worries about stealing of designs are not founded by reality.

    Many people work and earn 30 dollar an hour. Calculate how long it takes to copy off a circuit. Some people even earn 50 dollars or more each hour.

    Those who produce knock off designs in most cases anyway are not able to present a quality product.

    If a circuit board or kit is really good, there will be customers, and they will appreciate schematics, source codes, and well maintained websites.

    For sure a kit like seen here is a first step to build something electronic. Not everyone wants to program a chip from point zero onwards.

    Before the internet existed, technology much more was a mystery, consulting companies made money just passing on pieces of information. That is still happening, but no longer for trivial technology.

    With some effort, I was even able to encounter PDFs about multiband telephony from Mitsubishi- basically how microwave mobile telephones work.

    I would really say most people won't be able even to understand it.

    The concerns from Vellemann about their designs becoming copied are unfounded, they should make all information available, so electronics beginners can make the most out of it.

    If they don't, the free market will decide.
     
  15. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    I note that you are a member of the Velleman forum. Did you find the schematic there? If not, see the attachment.

    Once you have digested the schematic, your next challenge is to change out the PIC to one with flash memory and write your own code for the clock. Once that is done, add a 32.768 MHz crystal and use that as your time base. :)
     
    edwardholmes91 likes this.
  16. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,010
    3,764
    Go to the microchip.com website and they have several application notes for digital clocks, I think one is even called, "yet another digital clock application note".

    All the code is there and an explanation of multiplexing 7 segment displays.
     
  17. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,010
    3,764
  18. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    So, everything is available. The office lady just did not know properly about the technology.
     
  19. edwardholmes91

    Member

    Feb 25, 2013
    181
    18
    Oh I don't deny the information is probably out there in some shape or form. She was just unwilling to let the companies intellectual property out. Like you say though, the market will decide.

    I have made several Velleman kits in the past, a "Deluxe LED Christmas Tree" a "Kitchen Timer" a "Steam Engine Sound Generator" a "Digital Clock" to name a few, but I stop buying them because I wasn't learning anything from them. They were merely a soldering exercise and the accompanying notes were far from educational.
     
  20. sykesy10

    Thread Starter New Member

    Mar 21, 2013
    2
    0
    Thanks Alot guys
     
Loading...