That should work for the SERIN2.
But you will probably want to get rid of the 2D stuff.
That should work for the SERIN2.
But you will probably want to get rid of the 2D stuff.
Dave
Always wear safety glasses while programming.
hi mackrackit, it been a while..
about the 2D arrays, i agree. you should get rid of those..its just making things complicated..all you need to do is simply save the file names in arrays of 12 characters like this:
SERIN2 VinTXD,84,[SKIP 20, WAIT(CRET),STR FILE1\12 \CRET,WAIT(CRET), STR FILE2\12 \CRET,WAIT(CRET),STR FILE3\12 \CRET,WAIT(CRET),STR FILE4\12 \CRET]
skip 20 is to avoid saving unnecessary prompts such as "device detected" or something like that.
cret is where i saved $0D (carriage return). files are separated by carriage returns in between them so what i did was wait for its occurrence for me to be able to know when it is the end of a file and the start of another so that i can save it to another array.
if you want to view a new batch of files, do something like this:
SERIN2 VinTXD,84,[WAITSTR FILE4\12, WAIT(CRET), STR FILE1\12 \CRET,WAIT(CRET), STR FILE2\12 \CRET,WAIT(CRET),STR FILE3\12 \CRET,WAIT(CRET),STR FILE4\12 \CRET,WAIT(CRET)]
you will then receive a new set of file names saved in FILE1 to FILE4.
hi,
may i ask..if i wan to use battery to replace the power supply, what battery to recommend?
That is a difficult one to answer.
The VDIP requires 5 volts. Four re-chargeable "AA" batteries will give ~4.8 volts, close enough but for how long. Then if someone were to use regular batteries now there is ~6 volts present, not good, the MCU will "smoke".
Could use a 7805 regulator with a ~9 volt or higher battery pack but then you need to carry around a "brick" of batteries. And the 7805 requires a heat sink and is not the most efficient thing out there, reliable yes... LM317 could also be used but has some of the same problems.
You may want to use a switching regulator. Could have one that works with a battery input from 3 to 6 volts, then four "AA" batteries of any type will work. Depending on the circuit the efficiency can be very good.
Not knowing the load of the finished project, you may not know yet either, the best I caqn do is point you here
http://www.national.com/analog
Look at the "WEBENCH DESIGNER". Input your parameters and see what come up.
I have also hear some talk about off the shelf DC to DC converters.
Dave
Always wear safety glasses while programming.
Be cautious with your battery types here... 4 NiCad AA's will give about 4.8v, but 4 rechargeable ALKALINE AA's can give over 5.6V +
For linear regulators, these aren't too bad...
http://ww1.microchip.com/downloads/e...Doc/21991c.pdf
Only a couple hundred mV dropout voltage, so they work OK on 5 v circuits from a 6v battery.
If you need to run off a wide supply range, including sucking batteries down "to the last drop" then a good switching supply is THE way to go....You may want to use a switching regulator. Could have one that works with a battery input from 3 to 6 volts, then four "AA" batteries of any type will work. Depending on the circuit the efficiency can be very good.
steve
Byte_Butcher, Where do you find rechargable ALKALINE AA's ? I have never heard of such a thing.... I'm curious...
Dave Purola,
N8NTA
/Cough/ err... well, they do exist, and a quick google search should find you some. But I was MISTAKEN about the ones that I have. I was sure it said Alkaline on the package when I got them, but on closer inspection, these say NiMH on the side of the battery.
So I guess I meant to say that" 4 rechargeable NiMH AA's can give over 5.6V +" Sorry...
steve
Bookmarks