Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Coding SD Memory Cards

Status
Not open for further replies.
tytower said:
I thought usb was a serial device ? It has 4 connections ,2 power and 2 data being D+ and D- . One is usb to device other is device to usb but the signal is serial on either data line no?

USB is a device that works in a serial fashion, but it bears no resemblance to 'serial' as its commonly understood, as used in RS232.
 
Nigel Goodwin said:
You might not be convinced, and you're not 100% wrong - it would be possible, but not at all practical - essentially you would be building a hardware programmed computer from scratch. It's really such a silly idea!.


Hey fair go Nigel don't put the Lad down . Who knows what changes might be brought about with a fresh look at basics. If nothing comes of it , it is still a valuable learning experience for him.
 
Moving Parts (no, not roles in a soap opera)

Super_voip said:
Here is the first site from google, **broken link removed**

This altimeter described in no way suggests no moving parts. All we know is that the pressure transducer somehow changes the resistance of some element. It's more likely than not a mechanical link to a variable resistor of some sort is used.

Once the initial electrical parameter, for a given pressure, has been established, then there's no further need for mechanics (in his altimeter or mine).

Of course my first thought was linkage to a variable resistor but, that implies a mechanical link (with its attendent problems) and, my current thinking (still very much in-work) is to do it optically with a laser bouncing off a mirror attached to a borden tube. In that case the only mechanical lag or backlash is the actual molecular structure of the material the borden tube is made of.

His circuit needs to account for the mechanical and thermal non-linearities as real electrical variables. "My" system does not. The only requirements for my altimeter are that the end-to-end movement of the borden tube be within the altitude range of the altimeter (eg: -1000 to +50,000 feet and -40 to +90 C) and be absolutely repeatable.

In manufacture the altimeter would be individually programmed with the code and code conversion "burned" into its unique SD card. By taking advantage of the large data storage of the card, you simply store lots and lots of values. You never have to use a computer to interpolate data based on measured parameters. You simply match up a pressure and temperature as addresses and that spits out the altitude.

Of course, there will be the need for processing to integrate the data into the barometric correction the pilot dials in but, as stated in a previous post, that is a separate issue from the basic altimeter programming.
 
Serial is not always oatmeal

Nigel Goodwin said:
USB is a device that works in a serial fashion, but it bears no resemblance to 'serial' as its commonly understood, as used in RS232.

Serial is serial. It's one bit following the next in a wire (or over a radio or optical or acoustic transmission medium). Is USB a different standard than RS-232? Absolutely! But, that's just the electrical specifications (interface electronics, method of "sychronizing" the data between the transmitter and receiver and voltage and current levels, etc).

The added complexity of the USB interface is that it contains a lot of "computer stuff" used to identify which of 127 possible devices that are sending the serial stream (along with a veritable plethora of other data. If you've noticed that, when you plug in a USB device you often get a little balloon telling you what sort of device it is and sometimes even the manufacturer and device model number...that's all in the USB data frames).

This is a very cursory description and quite frankly, when I went to see if the USB interface was something useful for the common man, I ended up being thoroughly confused!
 
Last edited:
Ignorance is Bliss?

tytower said:
Hey fair go Nigel don't put the Lad down . Who knows what changes might be brought about with a fresh look at basics. If nothing comes of it , it is still a valuable learning experience for him.

Actually, Nigel's approach seems to be the "norm" these days. Quite literally, if someone wants to change a 1 to a 0 their thoughts automatically go to a computer program.

I'm certainly not trying to imply that computers and programs are not useful and necessary. I'm just not convinced that every logic problem has a processor and associated program as the solution.

For simple problems the answer may be a couple of TTL or CMOS gates, inverters, counters, comparators, multiplexers, etc. The functions may even be best served by mechanical switches. I disagree that it's "silly" to assume that you can use an SD card without having to resort to a full-blown micro processor of some sort under every circumstance.

Maybe if I was smarter I could see just how wrong I am? In the meanwhile, I'll try to continue to do simple things the simple way.
 
Last edited:
crashsite said:
For simple problems the answer may be a couple of TTL or CMOS gates, inverters, counters, comparators, multiplexers, etc. The functions may even be best served by mechanical switches. I disagree that it's "silly" to assume that you can use an SD card without having to resort to a full-blown micro processor of some sort under every circumstance.

Maybe if I was smarter I could see just how wrong I am? In the meanwhile, I'll try to continue to do simple things the simple way.

So perhaps you would care to inform us of your 'simple' way of accessing a USB memory card, with a zero-processor solution, and only a couple of standard TTL or CMOS chips?.

I would imagine everyone here is all for the 'simple solution' - I'm presuming you're only young?, and not experienced in electronics? - us 'older' types come from the generations before micro-controllers or micro-processors, so know what such things involved. I would imagine a standard TTL/CMOS gate USB memory solution would run to hundreds of chips? - and with no processor what would you be doing with the data anyway?.
 
This is an excerpt from the lecture notes on this **broken link removed**
MANY applications are better suited for implementation by general purpose digital systems (Processors) than by dedicated logic
Fantastic 18F book by the way.

Building even a simple digital clock requires a fair amount of logic ICs, it's more work and the parts WILL cost more than a modern microcontroller that could do the job better. Even worse the TTL & CMOS chip line has been slimming down over the years just like legacy devices on your PC.

If you're building something with discreet logic as learning experience that's great, but microcontrollers are popular for a reason. You can buy a decent programmer for less than the cost of a decent soldering iron.
 
Last edited:
I miss the days when we built most everything with logic chips and a few analog parts. But I do not want to go back to it.

With a few exceptions refusing to learn to program is a limiting decision. I am talking about the hobby type or one man team here.

If my crystal ball is any good I see a hobby type needing to work with programmable parts as well as processors. Not sure how far away that is. It is here already if you want to work with high speed applications like building a digital scope or LA. But these would be rather advanced projects.

The converse is also true. A hobby type who wants to "make things happen" needs to learn some basic electronics. Programming by itself runs out of steam in short order.

crashsite said:
Actually, Nigel's approach seems to be the "norm" these days. Quite literally, if someone wants to change a 1 to a 0 their thoughts automatically go to a computer program....

For simple problems the answer may be a couple of TTL or CMOS gates, inverters, counters, comparators, multiplexers, etc. The functions may even be best served by mechanical switches. I disagree that it's "silly" to assume that you can use an SD card without having to resort to a full-blown micro processor of some sort under every circumstance.

Maybe if I was smarter I could see just how wrong I am? In the meanwhile, I'll try to continue to do simple things the simple way.
 
In response to the original question, SD communications with PICs is relatively simple. It uses SDI communication and plenty of people have done it out there with PIC Microcontrollers.

Here is a link to someone who has made a GPS datalogger with a SD interface (with source code :D )

**broken link removed**

Even if you decide not to use a PIC to interface it, the site will give you an idea as to what is involved with talking to a card.
 
Us Old Farts

Nigel Goodwin said:
So perhaps you would care to inform us of your 'simple' way of accessing a USB memory card, with a zero-processor solution, and only a couple of standard TTL or CMOS chips?.
.

I guess I'm not quite convinced that the SD card is a "USB device". It is certainly used in a lot of devices that use the USB interface to transfer the data but, the card itself is not capable of plugging directly into a USB port.

No, I'm not a young fart...I'm as old or older than yourself. My first real hobby effort that dealt seriously with memory was a digital oscilloscope and it only used about 7 or 8 discrete chips (8-bit sweep and vertical resolution with a blistering fast National Semiconductor A/D converter...rated for a conversion speed of 10 k samples/s but, I was pushing to its limits at about 35). Fun little project and it worked like a champ (in a lab environment of course since it needed external clocking from a pulse generator and such).

But, I do realize that there is a "problem" with the SD card right off the bat. There's just not enough contacts to be able to address it directly much less transfer data to/from it as well. That's why I posted my question here. Thus far, I've gotten zero practical information about programming the SD card from this source (if you look back through the thread there is NO info about the technical aspects of this task beyond the general and persistant admonition that you need to use a processor). This doesn't seem to be the right forum to glean this sort of info.

I'll go one step further. I saw the Z-80 chip (many moons ago and now see the PIC) as a "solution" to a lot of the things I wanted to do and, as a piece of hardware, could see how the instruction set could be implemented and the support chips interfaced. But, there seemed to be a gap of "expertise". That of getting the instructions to the chip (Z-80 or PIC) to do the actual work.

I'm not really much of a programmer and don't have a strong interest in it so, I'm always looking for "simplified instructions" but, while it seems like there should be some ABC approach to getting instructions to a device, in a practical sense, there doesn't really seem to be. It's sort of like a florist who enjoys flower arranging being made to learn about the properties of cow dung so as to make the flowers to be arranged.

When I look through the post (even for the PIC stuff) I find a lot of high-level throry being tossed around. I have to wonder just how many projects are actually being built and how many are just mental exercises. I certainly have nothing against mental exercises and by far the majority of the ideas I have will never see the heat of a soldering iron.

I've done a little BASIC programming but, always had the same ultimate problem as I have with my computer today (and, which I believe a lot of other hobbiests also see as a problem). As long as you're dealing with text and numbers and graphics, on the computer, you're pretty well supported. If you are using a device that someone else has determined you need (digital camera, printer, MP3 player, mic and headphone, etc.), you are still pretty well supported. If you want the computer to do anything else, you're pretty much in a wasteland. My "green house" post yielded a lot of good ideas but, virtually no practical solutions. That is, no fleshed-out, specific monitor or control devices that could be used.

Something I'd like to find (and, I'll bet a lot of other people could use, too) is a tutorial that does not assume either programming or hardware expertise but, concentrates on the procedural process of sending simple instructions from the human mind to a PIC (or other processor). That's the gap in my mind. I know what I want to do and I know what I want the hardware to do but, not sure how to get the twain to meet (to wax a bit poetic).

Now! All that should get me a pretty good ration of something, eh?
 
Read the link I posted above and it will give you a better idea on the comms protocol the SD card uses - I think it only uses 3 lines and a power/gnd but I've not played with one yet.

Googling SD Card communications protocol SPI will also get you a fair way.
 
Crashsite, I respoded to your micro controlled house thread and I recall you thought my method of an embedded web server with some I/O was too complex for the average joe. You mentioned tv control (that alread exists and so do various forms of my version, look up stargate hcs for example)
The internet appliance is coming, for some it's already here. The web IS the way to master it (heck most mobile phones have some form of web access), it's also likely over time it will be invisible to the home owner but the early adopters will have to set the groundwork.
The device shoud be as low power as possible (you don't want a big ol Pentium gobbling up all the electricity you're trying to conserve).
Your HVAC, security & eventually all your home appliances will probably have a telnet clinet or xigbee (some already do, coffee makers & microwaves Westinghouse) you can even buy internet thermostats but they're $$$ (that's why I'm making kit versions)
It won't be done with a box of TTL and a couple of 555s, firmware is the solder of today.
 
blueroomelectronics said:
Crashsite, I respoded to your micro controlled house thread and I recall you thought my method of an embedded web server with some I/O was too complex for the average joe.

Yes. I also think that you are in a unique position, with your products, to take advantage of what is coming (which I believe you accurately predict). But, I do believe you need to face the reality of the "average Joe" who, by the way is even less technically astute than myself! The implemented solution to the "green house" needs to address people where and how it affexcts them and the way they'll understand it. That includes home owners, business owners, contractors, politicians, lawmakers, union officials, insurance companies, manufacturers, etc. (in short, anyone who has a stake, in any manner, in the process). There have been a lot of good and needed products that didn't make it simply because they didn't "catch the attention" of the right demographic.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top