What could we stuff into a 100kB "Prop Welcome Mat" drive image?
Tubular
Posts: 4,717
I've been playing with the big brother of the PIC18F27J53. When plugged into a USB port, these PICs can present their flash memory as a mass storage drive, with about 100kB of space left after code, FAT space etc
The PIC18F27J53 is available in DIP28 amongst other forms, and opens up a couple of interesting possibilities as an assistant for the Prop
* Being able to program the prop by simply right clicking and 'send to' the drive image (no Prop IDE required). A bit of code would then load that binary image into the prop
* Adding peripherals such as real time clock, micropower and 12 bit ADCs to the prop
* The potential to boot a second prop (there are 2 uarts)
* Putting a "Readme.Txt" file on there for assistance
* Putting HTML files with links to all sorts of useful prop stuff
* Maybe an AutoRun(able) EXE that provides terminal services, or an enhanced terminal previously discussed on these forums?
The 100 kB EXE thing has me checking what might fit. BSTC is slightly too big, as is TeraTerm. Could we come up with a really compact front end/terminal? Java? What would be compact enough?
The PIC18F27J53 is available in DIP28 amongst other forms, and opens up a couple of interesting possibilities as an assistant for the Prop
* Being able to program the prop by simply right clicking and 'send to' the drive image (no Prop IDE required). A bit of code would then load that binary image into the prop
* Adding peripherals such as real time clock, micropower and 12 bit ADCs to the prop
* The potential to boot a second prop (there are 2 uarts)
* Putting a "Readme.Txt" file on there for assistance
* Putting HTML files with links to all sorts of useful prop stuff
* Maybe an AutoRun(able) EXE that provides terminal services, or an enhanced terminal previously discussed on these forums?
The 100 kB EXE thing has me checking what might fit. BSTC is slightly too big, as is TeraTerm. Could we come up with a really compact front end/terminal? Java? What would be compact enough?
Comments
If I understand what your suggesting, you could do this by running a monitor program on the Prop with a 128 KB EEPROM. You wouldn't need the PIC chip. However, 100 KB really isn't much space to store a lot of useful stuff. It would be much better to use an SD card to store the files.
I'm puzzled why you went into detail about the PIC chip, and included the block diagram. What was the point of that?
Dave
Edit: I re-read your post again. So you are suggesting that the PIC chip could be used to provide peripherals, USB drive mapping and loading functions. There might be a good application for that. I still don't get the usefulness of a "welcome mat" versus just using the IDE.
So you attach the PIC to the PROP and mail out hundreds of thumb-drive
Propellers to micro-controller geeks world wide for micro-marketing
I assume the PIC can be used to boot Propeller as I2C EEPROM.
A nice web-page would be a good launch-point introduction.
I've often thought about using DVD's for catalog massive mail marketing.
Now consider spending about the same $3 on the PIC. The advantages as I see it
* By presenting as a mass storage device, no software is required on the PC. Its just like connecting a USB memory stick. Non threatening... and perhaps AutoRun.Exe could make it even friendlier
* For loading programs, right clicking and send the binary also would enable experimentation without needing to get to grips with the IDE (as good as the IDE is, but remember we're "advanced" users) , eg to load the Turbulence binary on, etc
* The feature set of that PIC is quite rich. It can potentially eliminate the EEPROM, while adding USB, RTC, 12 bit ADC, and micropower management. The diagram is there because others may need other functions (8x8 multiply, touch sensing etc)
Finally the DIP-28 is a low barrier for us to adopt than the FT232 tssop (or qfn)
I was thinking more of booting using the RX and TX pins P30/31 for this, for compatibility with programs that use FDS.
The peripheral functions (ADC, RTC) could be supported over I2C though.
One low-tech (but not necessarily simple) approach is to have a device with an sd card in it and a switch that controls what the card is attached to. With the switch in one position (I'm thinking low-tech mechanical switch), the card is connected through normal card-reader hardware to the usb connection on the device. In this case, you plug it into the computer and all the computer sees is the sd card as an external drive.
If you flip the switch to the other position, the usb connector is attached to the prop (normal communications) and the sd card is attached to the prop (to get program using boot loader).
You write your program and dump it to the sd card. Flip the switch and the prop runs the program.
Here's what I did before (a simpler situation):
http://www.pjrc.com/tech/mp3/gallery/page23.html
This allowed me to switch a hard drive between a usb interface (for loading the drive from the pc) and an mp3 player (for playing what was loaded onto the drive).
Cluso and I have one of these http://www.citysoftware.com.au/Havit's__Not_Just_an_FM_Transmitter__HAV0002.aspx, if that works there is the possibility to transmit an audio stream (Prop>PIC>Havit>FM) for say an audio readout multimeter.
I've posted screenshots and pics over in the blog area.
The good news is the mass storage aspect seems to work reliably now (Microchips 14th July 2011 build). The bad news is the storage space is now limited to 7.5kB rather than 100kB. I'm guessing this has to do with the available RAM which is 8kB on the PIC18F47J53.
Hence I was asking about very small terminal programs. Andys Purebasic one at 9kB is a mighty good effort and comes mightly close. If we could stuff a terminal program on there, the prop could do the rest, and this would be a really easy to use system bypassing any user software installation whatsoever.
7.5kB is not useless - its good for being able to copy configuration text files over, for instance. Or we could have an HTML page with a welcome and links to all the prop goodies. Or both (subject to size constraints). And of course once the USB stuff is enumerated, the CDC class serial comms is there afterwards for serial communications with the prop, plus that micro has 12 bit ADC, 5V inputs, low power consumption and some other goodies that the Prop can make use of. And the chips are available in good old DIP packaging
Really though I'm not the person to make this happen because i) I really hate programming PICs after being spoilt by the prop, ii) am very focussed on some commercial prop applications right now and iii) don't have sufficient usb and/or pic experience.
There is example code for composite MSD (mass storage) and CDC (serial comms) class, and really it needs a PIC programmer person to write a PIC program that provides read access over I2C to the PICs memory (is MSD drive space), ADC, and other peripherals. Like what Jazzed did with his keyboard/mouse using a Atmel micro.
Any takers?
I am wanting to do this with an ATTiny. It is a much nicer pasm than PIC, and closer to the prop. If I have to learn another, it may as well be the AVR. I have an AVR pcb in my new 1"sq prop footprint, just for such an idea
The 7.5kB is for the 'shared drive' with the PC, so you can just right click on a file and "send to" the E: drive which is actually the PIC's internal memory. The PIC itself has 128kB of flash, and the demo .hex for combined mass storage MSD and CDC serial is about 56kB, so plenty of room left for a prop booter over I2C or serial.
I guess I should investigate a corresponding Atmel part. I like the 12 bit ADC, and DIP package availability of the PIC one.
I have some Attiny20's in (no usb but relatively cost effective and prop programmable)
We must catch up some time soon
cheers
tubular
Now that there are 256KB chips (with 40PDIP) it night be worth the effort. At present the biggest ones, in PDIP, I have are M644s but the principle should hold.
I have never played with PICs, just because I didn't want to have yet another set of instructions to clutter up my befudded mind.