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.

LCD and DFplayer working simultaneously

Status
Not open for further replies.

muphy

Newbie
Joined
Jan 13, 2019
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
I have separate codes.
1) for displaying data on 16*2 LCD which is shifting at 0.5 seconds
2) another code for playing songs on DFplayer (2 minutes song whic plays when I press a button)

I want to play the song and the text on the LCD to be shifting at the same time.

How do I do that. bec the code waits till the song is being played by the dfplayer.
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,992
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
you have not included the overall code structure.
One reason can be that the DFplayer code may contain a wait like routine which returns only after player started.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
23,045
Helped
4,716
Reputation
9,448
Reaction score
5,092
Trophy points
1,393
Activity points
152,661
Hi,

Use interrupts. That's why they are invented.
It should be no problem to control the display shift in an ISR.

There are many tutorials how to use interrupts. I'm sure there are a lot of examples with displays.

Klaus
 

shubham kumar

Member level 3
Joined
Sep 11, 2014
Messages
59
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Location
bangalore
Activity points
511
thanks a lot for the help. I found out that dfplayer works on serial port so one just have to give commands to play an audio and then the main code runs as usual. I need to write the logic to see if the song has finished playing before playing another.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top