Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC and 8*8 LED dot matrix Display Interfacing

Status
Not open for further replies.

xyzabcpqr

Junior Member level 3
Joined
Mar 22, 2012
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,523
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.
 

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

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?
 

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.
 

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..
 

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 : https://www.edaboard.com/threads/112218/
https://www.edaboard.com/threads/231581/
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top