Need LCD display advice

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi everyone, I am using 27443. My task is to output DAC value with timer, read ADC value at the same time, compare them to get the max value and display the max value on the LCD. I attached my prj below. 

   

After that, the user will be asked whether to save it to E2PROM. If the answer is yes then I will jump to the next function. 

   

The problem is, the LCD displayed everything (ADC value, the question) at the same time while I want it to happen in sequence, which means when all the process of DAC output and ADC comparison to get the max value finish, the question whether to save would pop up. 

   

The same problem happens when I want to surf the saved struct in the E2PROM. 

   

To be clear, I want the LCD to display things in sequence. Do you guys have any ideas on how to do that? I have stucked there for days...

   

Thanks in advance!

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The while-loop in your main1() controls everything, so: what do you want to have displayed when NO button is pressed.

   

When returning from your Start_scan() or Read_from_E2Prom() and the corresponding button is released what shall happen to the display, cleared? Wait for any user action, then clear?? Keeping the display until the button is released??? Waiting for 5 seconds, then clear the LCD????

   

You have all (and some more) choices.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This might be of use -

   

 

   

    

   

          

   

PSOC 1 State Machines

   

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CCcQFjAB&url=http%3A%2F%2Fread.p...     AN2329

   

 

   

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCcQFjAA&url=http%3A%2F%2Fread.p...     AN2332

   

 

   

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CB4QFjAA&url=http%3A%2F%2Fread.p...     AN2333

   

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Thank you guys, 

   

I decided to use timer to do the task  The State Machine documents danaa provided gave me a thought but unfortunately I can't find the example project and besides I'm not familiar with State Machine so I had to find another way 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Fine that you have got it working!. Using a timer is a quite common solution for problems like yours.

   

 

   

Take it as a friendly advice: State-machines are to be found everywhere and are a very mighty instrument to control software (and hardware) flow. Read how to use them and start programming simple machines. Since you are using PSoC1 you are a bit limited with debugging capabilities if you do not have got an ICE-Cube. So when you can spend the money get hands on a Pioneer Kit and extend your knowledge in PSoC programming.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I have the files for the ap notes, if you wish them send an

   

email to danaaknight@gmail.com

   

 

   

I cannot seem to get them to upload.

   

 

   

Regards, Dana/

0 Likes
Anonymous
Not applicable

 Thanks Bob and danaa, 

   

I use PSoC 1 for simple application to begin with the microcontroller programming, I have the plan to work with higher level of microcontroller and the Pioneer Kit is on the list. 

   

danaa: I send an email to you, please send me the file for the app notes. 

   

Thank you very much 

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I sent the files this morning.

   

 

   

Regards, Dana.

0 Likes