Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Sending a source file to the PicoMite
Author | Message | ||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
I realise that I should already know this but: If I have my MMBasic source file on my Tablet and I want to send it to the PicoMite via Bluetooth serial, what kind of header do I need to send? I understand that the file needs to be terminated with ctrl-z, right? |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6783 |
The PicoMite deals in pure ASCII. You can't send it bluetooth directly anyway, you'll need a suitable receiver (HC summat or other IIRC) and then convert to 3V3 TTL to feed a COM port set up as the console. At that stage whatever you send from the tablet should appear on the PicoMite, I think. AFAIK there are no special headers or anything, it's just ASCII text as if you were typing via a terminal. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
at the prompt, type >AUTOSAVE <CR> the mite then goes into listen mode and will take everything that arrives as program. You terminate with CTRL-Z as you state above. There will be a momentary pause as everything is copied to flash and then you get yur prompt back... you should be able to LIST what you just sent and if you dare RUN it h |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4223 |
You will need a wired connection to setup the com port, and configure it as console. Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
@Mixtel90: Understood; I've being bluetoothing program data to the Mite for a long time now. Now I wanna send the actual prog. @CaptainBoing: Thanks Cap'n. Presumably the AUTOSAVE <CR> can be the first line of the text file...or would I need a delay? @Volhout: Oh yeah, already understood that but now comes another question that I should know the answer to: Let's say the com port wasn't the console and I simply received the source and stored it in drive a: Is there a mechanism within MMBasic to load it and become the active program? Like RUN or CHAIN or something? But have it become the startup program? |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1241 |
No, this (AUTOSAVE <CR>) should be entered at the prompt on the Picomite. Regards Michael From manual p86: Edited 2024-06-01 04:31 by twofingers causality ≠ correlation ≠ coincidence |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
... or you could connect the console Rx/Tx to the BT adaptor - I have done similar with HC-12s (433MHz jobbies) with no issues. Does like a slow baud rate for uploading new software otherwise you get gaps, but fine for console interaction. @Phenix : yes you can put the AUTOSAVE as the first line, whether it needs a delay as the 2040 "set's up"... dunno, suck it and see and report back... you could try adding a few more blank lines after the AUTOSAVE I spose. You can also embed the CTRL-Z in the text file - I do this a lot to speed up development - I mainly use MicroMites (PIC32MX170 based) and I always transfer new software to them using AUTOSAVE, so when the file transfers, it automatically saves and I have an embedded RUN after the CTRL-Z. this might not work over BT... but there is a buffer on the console... so it might... see above about sending too fast. YMMV - the RPi can probably keep up better than my little 48MHz specimens. There is a very nice set of terminal progs for Android that use BT (or USB) by a guy called Kai Morich, search for "Serial Bluetooth Terminal" - unless you have iOS in which case I can't make a recommendation. example from one of my files (editor=Notepad++): h Edited 2024-06-01 05:44 by CaptainBoing |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
all depends on how you interpret the console... or have I misunderstood? assuming the BT adaptor is connected to the Rx/Tx of the console, it works. I wrote a quick text file: and pasted it into the console... The MM went into autosave mode, uploaded the file, saved it and ran it in a single operation. The 'mite has no way of telling where the characters came from when they turn up in the console, so it can't tell that you didn't type AUTOSAVE<CR>, it just dutifully interprets the stream of text and acts accordingly. In fact, it had never occurred to me to do this, I might start doing all the time to cut out a step in my uploading when developing - I can literally cut and paste between the editor and the console. h Edited 2024-06-01 06:04 by CaptainBoing |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 857 |
One of the reasons I like BT (SPP profile) is that; it's totally transparent. IOW a wireless wire, just like wiring UARTs together. |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1241 |
Very tricky! Thank you1 Autosave.zip I can confirm it works with PicoMites too. Best regards Michael causality ≠ correlation ≠ coincidence |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
A number of the programs which vegipete has posted have begun with AUTOSAVE and ended with Ctrl-Z. I don't remember whether or not they have also had a RUN at the end. I remember learning the CUT F10 (AUTOSAVE) PASTE CTRL-Z method from one of the Cap't's posts a good many years ago, with notepad++ as the editor on the PC. Very satisfactory coding flow for me. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
and for me also, I only load software that way - and now, I do it with the AUTOSAVE at the top - it makes deploying from the editor a sub-second process - excluding the screen-scrolling while the code loads (I am so lazy) I hadn't seen it done anywhere else, but hat-tip to vegipete h Edited 2024-06-01 22:25 by CaptainBoing |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Another option is to use TassyJim's MMEdit. Just click the Run icon and your program gets loaded and runs. Just one click, nothing extra to type. To aid your creativity it has optimizations for all MMBasic devices. |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2075 |
yes it is a very good devkit and I would use it if I didn't need my tool chain to be agnostic |
||||
Print this page |