+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Junior Member level 3
    Points: 563, Level: 5

    Join Date
    Mar 2012
    Posts
    26
    Helped
    0 / 0
    Points
    563
    Level
    5

    PIC and 8*8 LED dot matrix Display Interfacing

    Hello,

    I am using PIC16F1937. For the software platform MPLAB and Hi-Tech Compiler for C programming.

    I need to Display the real time clock with alarm settings on 8*8 LED Dot matrix display(DE-DP10XV110 ).

    Can any one explain me the how to code for clock in C as well as the interfacing with 8*8 LED Dot matrix display?


    I am very new in PIC Controller world. So your information will really helpful for me.

    Thanks in advance.

    •   Alt3rd April 2012, 13:35

      advertising

        
       

  2. #2
    Advanced Member level 4
    Points: 6,490, Level: 19

    Join Date
    Feb 2011
    Posts
    1,170
    Helped
    284 / 284
    Points
    6,490
    Level
    19

    Re: PIC and 8*8 LED dot matrix Display Interfacing

    The link here shows an open source project that drives multiplexed LEDs, so that is your LED display question resolved.



    •   Alt3rd April 2012, 14:42

      advertising

        
       

  3. #3
    Junior Member level 3
    Points: 563, Level: 5

    Join Date
    Mar 2012
    Posts
    26
    Helped
    0 / 0
    Points
    563
    Level
    5

    Re: PIC and 8*8 LED dot matrix Display Interfacing

    Thanks for your time and concerns.

    I just gone through the link.I got the point.

    I want to display Real Time Clock using timer1 (32.768KHz) of PIC16F1937.

    Do you have any idea Regarding this?



    •   Alt3rd April 2012, 23:17

      advertising

        
       

  4. #4
    Advanced Member level 4
    Points: 6,490, Level: 19

    Join Date
    Feb 2011
    Posts
    1,170
    Helped
    284 / 284
    Points
    6,490
    Level
    19

    Re: PIC and 8*8 LED dot matrix Display Interfacing

    I'm afraid I'm not familiar with PIC devices. But in principle, what you need to do, is:
    1. Create hour, min and sec variables, and initialize to (say) 12, 0, 0 for 12.00pm
    2. create an interrupt service routine that increments sec until it reaches 60, and then sets it to zero and increments min until it reaches 60, and so on.. At the end of the ISR, clear the interrupt.
    3. Program the registers so that timer1 is set to cause an interrupt when it reaches a value that equals 1 second. For example if you were (say) using a 4MHz crystal, then the value will be high. Make sure you set any prescaler to any value so that the count fits in the PIC's counter register which will be 8 bits or 16bits probably
    4. Now, in the main code function (assuming you're using C code - it really is not worth learning assembler apart from for very specific use-cases), just have a simple forever loop [i.e. while(1) ] that reads the
    hour, min, sec variables and then outputs the corresponding codes to make your display do whatever you want. An 8x8 display is a bit odd for a clock. I'm guessing you want scrolling time. In that case, in an area of RAM (assuming you've got enough RAM), create a bitmap of the digits you want to display, and then have a loop that outputs them to the display, with (say) a delay of a few millisec as the multiplexing occurs. The code can repeat forever.

    The above doesn't allow you to _set_ the time. For that, you need to adjust the code to incorporate switch inputs too - that could be a 'stage 2' feature once you've got the rest of it running.



  5. #5
    Junior Member level 3
    Points: 563, Level: 5

    Join Date
    Mar 2012
    Posts
    26
    Helped
    0 / 0
    Points
    563
    Level
    5

    Re: PIC and 8*8 LED dot matrix Display Interfacing

    Hey My code is working.. I wrote a code for LCD and PIC interfacing for displaying Digital clock.

    Now I am switching it to 8*8 LED dot matrix.
    Do you have any idea/suggestion for that please help me.

    Thanks again..



    •   Alt9th April 2012, 15:09

      advertising

        
       

  6. #6
    Advanced Member level 3
    Points: 4,828, Level: 16
    papunblg's Avatar
    Join Date
    Oct 2010
    Location
    Kolkata India
    Posts
    726
    Helped
    172 / 172
    Points
    4,828
    Level
    16
    Blog Entries
    9

    Re: PIC and 8*8 LED dot matrix Display Interfacing

    Quote Originally Posted by xyzabcpqr View Post
    Thanks for your time and concerns.

    I just gone through the link.I got the point.

    I want to display Real Time Clock using timer1 (32.768KHz) of PIC16F1937.

    Do you have any idea Regarding this?
    If you want to use seperate RTC chip with option for battery backup see http://www.sixca.com/micro/pic/ds1307/index.html

    ---------- Post added at 21:28 ---------- Previous post was at 21:26 ----------

    Also : http://www.edaboard.com/thread112218.html
    http://www.edaboard.com/thread231581.html
    Rajsekhar Nag
    -------------..--------
    Knowledge Grows When Shared



--[[ ]]--