doorbel

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
jacobsg
Posts: 14
Joined: Sun Jun 14, 2009 10:45 am
Has thanked: 2 times
Contact:

doorbel

Post by jacobsg »

This is a question I have from your microcontroller system engineering book, secret doorbel programme page 48. I have altered the programme (not for commercial use) I am trying to learn and understand the use of flowcode and string manipulation. The programme works perfectly except for the following: I have changed the display on the lcd. The 2 number code is now displayed on line 0,1. However only the first digit display and every subsequent digit is printed over the previos one. How can I change the display so that the two digits both display on line 0,1 next to each other. I attached a pdf flowchart for you to see.

Thanks

Gerhard
Attachments
practice1.pdf
(16.32 KiB) Downloaded 350 times

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: doorbel

Post by Sean »

Your program appears to control the cursor, or clear the display, after every keypress. I can not see all the details from the pdf image, but if the cursor command always puts the cursor at 0,1 then each character will always overwrite the previous one.

You can use variables with the cursor control macro to place the cursor at calculated positions, or use decision blocks to bypass the cursor command when you want the auto-increment feature of the LCD to put characters in adjacent locations.

If you want to print two single digits, only use the cursor command for the first digit, or use a digit counter as the x variable to position the characters.

Post Reply