LCD, Keypad and SD Card

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
David_Thai
Posts: 5
Joined: Mon Mar 02, 2015 10:35 am
Contact:

LCD, Keypad and SD Card

Post by David_Thai »

Hi Guys,
I started working with Flowcode about 6-8 weeks ago. I did a lot of tutorials from the Matrix website and from youtube. I also changed some of the tutorials to my needs or just to make it a little bit more fun. I have a lot more experience with MPLAB and MikroC but i like to get better with Flowcode.
I built some calculators, some kind of weather station and stuff like this. the most times I transfer the program to Proteus to check it again and to 99% it works and if it doesn't its most likely my fault :)
I never really worked with SD/MMC Cards before but now i gave it a shoot. my first project was a tutorial from youtube and it worked without any problems. It was just a SD Card to a Controller connected to a Display. So when I start the simulation it shows me the text I wrote on the Display and also saves it to a .txt file. I could not find any more tutorials with SD Card so I started my own Project. I used a code I already got from one of my first tutorials. Its just a 3x4 Keypad, PIC and a LCD. So if you push 1 on the pad it shows 1 on the Display, if u push 5 on the pad it shows 5 on the Display and so on....and all i wanted to do is to put the SD Card in between so that it saves all the numbers i push. For Example if i push 15121983 that it saves the number to the Card. sounds easy right? Guys.... since almost two weeks i sit on this crap and i just can not get it to run. Not for my Life!
if anyone of you knows a tutorial that could help me or maybe a website or whatever, please share it with me.
i ran into dead ends before but always made it somehow... not this time. i need help, please.
any kind of help would be highly appreciated

thanks
David

User avatar
Benj
Matrix Staff
Posts: 14962
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: LCD, Keypad and SD Card

Post by Benj »

Hello David,

Have you seen our Flowcode 6 Wiki? Specifically this page detailing the FAT component. http://www.matrixtsl.com/wiki/index.php ... 7bffb583c5

If you can post what you have so far then we can take a look for you and maybe suggest some ways for you to proceed.

David_Thai
Posts: 5
Joined: Mon Mar 02, 2015 10:35 am
Contact:

Re: LCD, Keypad and SD Card

Post by David_Thai »

hi Benj,
thank you for your quick answer. yes i found this page on google but i still dont get it. the reason why i want to learn Flowcode code is that how i see it, it makes thinks a lot more easy because for example i can change the mcu's at any time and the software does the rest for me. many people here have studied or/and do this for living. I started it to keep me busy because i stopped drinking and smoking :roll: ! i am a chef in a hotel and my wife says " I got to FAT !!! " okay enough about me. can i please ask you a stupid question?!
can u write the code for me and i pay you for this? well, as long as you dont want to much. but if u r okay with it i would love to send you a fair amount with western union.
the point why i offer you money is that i really tried a lot, more then you would believe and i just dont get it.i see you are an admin so i guess you could do it if you want. and for me its just easier to learn from a working code than to spent 2 more weeks and still blow it!
please let me know.

and thank u

David

User avatar
Benj
Matrix Staff
Posts: 14962
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: LCD, Keypad and SD Card

Post by Benj »

Hello David,

I have put together a very basic example for you which should hopefully do what you require and allow you to proceed.
Keypad2FAT.fcfx
(8.87 KiB) Downloaded 188 times
The only tricky bit was converting the byte from the keypad to a string used by the append function.

You will likely need to configure the chip and component connections to suit your hardware.

We do have paid people on the forums in the freelance section if you do want to try and get an expert to chip in and provide paid support.

There are also lots of free helpful resources on our forums, website, blog and wiki so be sure to check these all out.

I too am thinking about quitting smoking so I feel your pain, just looking into whether or not to move to a portable tobacco vaporiser.

David_Thai
Posts: 5
Joined: Mon Mar 02, 2015 10:35 am
Contact:

Re: LCD, Keypad and SD Card

Post by David_Thai »

Hey Benj,
Yes it is perfect. I just downloaded it, opened your Macros and Calculations and found my Errors immediately.
Also your code is much more compact then my one. In the loop for the keypad I went over my head. ! made it much longer but it still works.
So thank you very very much for your great help!

and our friend the cigarette. I tried one of those electronic cigarettes to stop smoking. Everyone told me they are so great and much healthier.
so i got one. they cost around 15-20 bucks here and you get them at every corner. I tried them with different nicotine levels, different Filters
and even with flavors. It just didnt work for me. didnt taste good and i used it more then i would smoke regular cigarettes.
but maybe it works for you.
with you the best of luck
and thanks again for your help

David

User avatar
Benj
Matrix Staff
Posts: 14962
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: LCD, Keypad and SD Card

Post by Benj »

Hi David,

Glad the program worked for you. Easy when you know how, hard to impossible when you don't.

I've tried those fluid based ecigs and didn't think much of them either, the vaporiser tech is fairly new still and uses actual tobacco rather then weird fluid poison so I have reasonably high hopes. One downside is it was quite a bit more than 20 bucks :wink: To be fair its probably better in the long run if I don't like it :D

http://www.gizmofusion.com/2015/01/meet ... by-vapium/

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Contact:

Re: LCD, Keypad and SD Card

Post by RobH »

Off-topic:

If I can quit, it must not be impossible. Hang in there, it gets easier with time. Now, I can't even stand the smell of an ashtray. Smoke free since 2008.

David_Thai
Posts: 5
Joined: Mon Mar 02, 2015 10:35 am
Contact:

Re: LCD, Keypad and SD Card

Post by David_Thai »

Good Morning everybody,
Thanks to Benj i have now a working Code for my Project. Now i change the MCU and the Pins to my needs. In the Flowcode Simulation all works fine but in Proteus it stopped at the 3rd Marco and my Display shows only " Init: "
so then i made something wrong with my SD config, right?
because it can not created the file where it should save the data?

thank you for all input

David

User avatar
Benj
Matrix Staff
Posts: 14962
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: LCD, Keypad and SD Card

Post by Benj »

Hello David,

Problem is likely to be related to the chip configuration settings. Can you post your program and also maybe your Proteus schematic so we can have a look for you.

David_Thai
Posts: 5
Joined: Mon Mar 02, 2015 10:35 am
Contact:

Re: LCD, Keypad and SD Card

Post by David_Thai »

Good Morning,

yes, sure.

Thank you
Attachments
MMC_Project.fcfx
(9.04 KiB) Downloaded 125 times
MMC_Project.jpg
(484.48 KiB) Downloaded 1852 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1204
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Contact:

Re: LCD, Keypad and SD Card

Post by QMESAR »

@David

I hope your FC is a licensed version and not a cracked version as your Proteus you are using,
The guys warned you at the Proteus forum :D

User avatar
Benj
Matrix Staff
Posts: 14962
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: LCD, Keypad and SD Card

Post by Benj »

Hello,

I think the problem is that your data pins are reversed. The Data out is connected to the Data out in the card. Instead you should change your software connections so pin C7 is data out and pin B5 in data in.

I also noticed in your config settings you have the watchdog timer and extended instruction set enabled, I would advise to disable both of these settings.

Hopefully this should get you up and running.

GamerXbot
Posts: 11
Joined: Mon May 04, 2015 10:41 am
Contact:

Re: LCD, Keypad and SD Card

Post by GamerXbot »

Is there possibility make lock system using keypad,lcd and led
i trying to make lock to my door so i only can get one number but second and third is hard to me so can someone explain how to i should that made
Attachments
Door lock system.fcf
(23.03 KiB) Downloaded 87 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 9035
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: LCD, Keypad and SD Card

Post by medelec35 »

Hi GamerXbot, have you read through
This thread?
Martin

User avatar
Benj
Matrix Staff
Posts: 14962
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: LCD, Keypad and SD Card

Post by Benj »

Hello,

There's a very simple keypad door entry system example available from here : http://www.matrixtsl.com/wiki/index.php ... try_System

Post Reply