[PIC] Need HELP in my Distance Ranger and storing values in SD CARD using PIC18f4550

Status
Not open for further replies.

Mahmoud Abuzayed

Newbie level 3
Joined
Jan 4, 2014
Messages
4
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Visit site
Activity points
54
Hello every one

I successfully made my distance ranger using pic16f877a up to 400cm,,, now i want to store distance variation values in SD CARD using PIC18f4550.
Here is my distance ranger project: https: **broken link removed**
My problem is i want to store the returned variable values from Ultrasonic sensor (Echo pin) into the SD CARD , the method used to store values in SD CARD to store variable analog values like temperature.
This is the value that i want to store ( variable pulse)


Please if there is any method to store variable pulse into the SD CARD, help me !

THANKS
 

Attachments

  • Distance Ranger Project.rar
    84 KB · Views: 112
Last edited by a moderator:

hello,

To use SDcard with a PIC, you need a very large amount of RAM to store each page of 512 bytes..

Did you used USB RAM area for that or normal RAM area?

i successfully tested SDcard FAT32 with a 18F46K22 (No USB) wich has > 3K RAM ,
The main probleme was how to obtain and handle large contigus space ram area..
My 2Go SD card is formatted under Windows XP OS with block of 512 bytes .
Read and write files by bloc of 512 bytes .. OK

Did you modify your linker file ?

i will have a look on your program,..next year !
 

Thanks for replying first ...

I think I will not have problems in storing in the sd card because as you say i used pic18f4550 which have 2048 SRAM space and i think it is good space for buffer data before storing and it worked fine in proteus simulation as you see this is a snapshot from image file used in simulation:


My big problem exactly is that the code used to store the data in sd card should receive Analog value to store it as temperature variations as shown above in image, but my Distance Ranger return pulse signal and it is variable in width like this one :


so, is there a way to convert that signal into analog value in mikroC, i mean another code or a recode it to receive that pulse with no bugs. if you want more details please do not hesitate in requiring. PLEASE HELP ME IF YOU CAN or provide me links or something else.
Thanks for your time and HAPPY NEW YEAR :smile:
 


Let's make things clear your having ultra sonic sensor giving output as digital pulse from that you measuring distance and you got success in it.Now what is the source for read temperature you didn't provide any details if you are using any temperature sensor.

And if you want to store the distance value then you get the good link as you attached in your rar file so just make any taxt file and store the distance data in the file and append the data when it changes.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…