![]() |
Forum Index : Microcontroller and PC projects : Help with BASIC
Page 1 of 2 ![]() ![]() |
|||||
Author | Message | ||||
Benzol Regular Member ![]() Joined: 07/01/2015 Location: AustraliaPosts: 64 |
Hi all. i have just joined as a member to get some background on microprocessor programming (Micromite). i have worked with discrete electronics for decades but the last programming I did was in 1980 on a PDP11. can anyone advise me on a site for basic BASIC programming or a book? when I search the internet it seems BASIC is very much out of favour. Thanks. |
||||
palcal![]() Guru ![]() Joined: 12/10/2011 Location: AustraliaPosts: 1982 |
Don't really know of any tutorials, build up a Micromite or Maximite and just try to learn hands on. Geoff's manual is very explanatory. Just start by flashing a LED and build up. You will get heaps of help from all of us here. Paul. "It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all" |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6268 |
Welcome to the forum. A good starting place for Basic is here: http://www.antonis.de/qbebooks/gwbasman/index.html MM Basic is based on GW Basic so many of the commands and the general programming style are the same. Jim VK7JH MMedit |
||||
halldave![]() Senior Member ![]() Joined: 04/05/2014 Location: AustraliaPosts: 121 |
or this site http://gwbasiclanguage.blogspot.com.au http://mmreference.com/product/pc-magazines-basic-techniques -utilities-ethan-winer/ and lots of unconverted GWBasic programs to play with http://mmreference.com/unconverted-gwbasic-programs/ |
||||
Benzol Regular Member ![]() Joined: 07/01/2015 Location: AustraliaPosts: 64 |
Hi. thanks to Paul, Jim and Dave. I have ordered a chip from Silicon Chip and now ready to go. My neighbour has asked me to build a circuit which will move a camera then trigger it to take several shots then repaet. a microprocessor is definitely the way to go. I will let you know progress. db |
||||
Oldbitcollector![]() Senior Member ![]() Joined: 16/05/2014 Location: United StatesPosts: 172 |
Benzol, It's true. BASIC on the old 80's computers of the past was slow, and painful. It's part of the reason that BASIC has fallen out of favour with the masses. The funny part is that most of the younger generation now have had zero exposure to it and are accepting their opinions from the old frogs who remember it painfully on PDP, AApple, Commodore 64, Atari, and Sinclair machines. In comparison, you'll find MMBASIC very fast and you should have zero problem getting the Micromite to do your project without the requirement of silly IDE's and libraries. I'm thinking that you might be able to use one of those little $5 relay boards and trigger the camera's external trigger connection (many have them, mind does) Welcome to the forums! Jeff My Propeller/Micromite mini-computer project. |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4034 |
PDP-11 BASIC-PLUS was fast and had lots of nice features so MMBasic will seem fairly familiar. It has some things missing, some extras, and some changed incompatibly, but that's typical of Basic. John |
||||
Benzol Regular Member ![]() Joined: 07/01/2015 Location: AustraliaPosts: 64 |
Hi Everyone again. i hope i don't become a nuisance here but i am having trouble. After getting my MM chip and finally a USB to serial I put together the LED cct as in Silicon Chip. No drivers for the USB to Serial so I ended up getting the Jaycar job. Triad again (many times) with different variants but the best i can get from MMEdit is "MicroMite Version V0.0 detected Error talking to maximite" I have checked the Comms, all good, rebuilt the circuit. What am i doing wrong?. thanks |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9586 |
If correctly connected from the MicroMite to the PC with a USB-serial adaptor, you should be able to talk to the MM using Tera Term set to 38k4 baud, and selecting the Silicon Chip USB Serial port option. Are you using Tera Term or something else to try to talk to your MM? Be aware that many USB-serial adaptors are 5v output, and the MM needs 3v3 CMOS logic, not 5v TTL logic. You can fix that issue easily, by putting a 1k resistor in series with the console RXD(pin 12 of the chip) to limit the current into this pin. Oh, and welcome to the forums. ![]() EDIT: Scratch that - you mentioned MMEdit. Should be working, but I know there ARE documented issues talking to a MM via the VT100 terminal unit, but I don't think you are using that... Smoke makes things work. When the smoke gets out, it stops! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Hi, I would start with some simple tests (assumes Windows). 1> Ensure the USB-to-Serial is working ok (and that the driver is installed). Check in Device Manager that a USB Serial Port exists and has been assigned a COM Port number. Remember this number. 2> Load TeraTerm. Short out the Rx and Tx pins on the USB-to-Serial module and ensure the typed characters appear on screen. Upon start-up, the connection should be via the COM Port number from step 1 above. 3> Now set TeraTerm Serial Baud rate to 38400 (defaults to 9600) AND REMOVE THE SHORT 4> Assuming that 3v3 option is set on the USB-to-Serial module (see Grogster's note in his post above) then connect the MicroMite up (Rx on USB to Tx on MicroMite, Tx on USB to Rx on MicroMite) 5> You may see a 'Welcome' message. If not, try typing. If characters appear then great news. If not then try pressing Ctrl-C (ctrl key then C key while still holding the ctrl key). If a prompt appears then great news. If you have no joy here then do try swapping Rx and Tx (just in case they are the wrong way round for whatever reason. NOTE: If no joy with the above, then try this: with everything connected as you think it should be, shut down TeraTerm and then restart it (immediately changing to 38400 baud). Then try typing - do you now see characters? This test is just in case you unplugged the USB-to-Serial module from the computer in which case it looses connection with TeraTerm. Good luck . . . . . ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6268 |
I agree with WW. The best way to check that you USB to TTL module is working is to short the Tx and Rx pins and look for characters being echoed. TeraTerm is the best choice at this stage. I deliberately said USB to TTL (not Serial). A standard USB to serial adapter will have the polarity of the Rx and Tx inverted (as well as too high voltage) If it's in a molded case, it's not right. The error messages you are getting in MMEdit confirm that you are not 'seeing' the micromite. Jim VK7JH MMedit |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6268 |
Bad: ![]() Good: ![]() Jim VK7JH MMedit |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Technically you are correct and therefore I need to change my module's name! ![]() Sorry if it has caused confusion to any of you. |
||||
Benzol Regular Member ![]() Joined: 07/01/2015 Location: AustraliaPosts: 64 |
Hi everone. thanks for the feedback, I really appreciate the help. I am using a USB to TTL converter. it's the Jaycar XC4241 as recommended in SC. I kept getting failure messages when installing Tera Term but it does appear to have installed. BTW with all the problems i also tried installing everything on my old laptop just in case it was a problem with the PC, same thing. With Tera Term I get a message asking for Host:. i don't know what to put in here so some help here please. The Port used is COM3, 38400, 8 data, No parity and 1 stop. I don't know what else to do. javascript:AddSmileyIcon(' ![]() regards |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Can you confirm if you are using Windows! If so, can you see the USB module in Device Manager? If so, then when you start TeraTerm, the bottom half of the window should show the COM Port that the USB module has adopted. IF THIS IS GREYED OUT (and you only have options for Host) then you have a hardware/driver issue with the USB module (which is why you need to check in the order above!) Keep trying - it will be worth the effort here . . . . WW |
||||
Benzol Regular Member ![]() Joined: 07/01/2015 Location: AustraliaPosts: 64 |
Thanks WW. Yep, using Windows 7. Device Manager says Freetronics 16U2 USB (COM3) = Device is working properly. Port Settings are 38400, 8, None & 1. Tera Term matches that exactly however TT error says Cannot open COM3. Tried New Connection - same result. |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2949 |
Benzoyl, Teraterm requires the comm port to be present before you open TT itself. In other words connect your USB TTL adapter FIRST then load teraterm. Also teraterm and mmedit cannot be both trying to use the came comm port at the same time. Where in Aus are you located? Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Hi Benzol, As Mick says, exit all applications and only start TT once you have the USB module plugged in. Once TT can see it, short out the Tx & Rx pins on the USB module and check that what you type appears on the screen. If so you're almost there!! WW |
||||
Benzol Regular Member ![]() Joined: 07/01/2015 Location: AustraliaPosts: 64 |
Yep, getting there. Only using TT, plugging in the uart before starting TT. Short Tx & Rx, seeing characters mirrored in TT. Plug the Tx & Rx back into the micromite but there it stops. Rx light on uart on permanently Tx led lights on keystrokes. maybe i have a problem with the micromite but i have triple checked everything. I'm in Perth, city of the permanent heatwave! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
OK - good about USB module - now to eliminate your issue: With the MicroMite, do you have a capacitor across pins 19 & 20? (i.e. vCap to GND). If not then this WILL cause it to not start. You need a low ESR cap - I like to use 10uF ceramic caps. If you do have a cap - make sure you have nothing else connected to the MicroMite (i.e. no LEDs or other circuits). Just ensure you have +3v3 (or there abouts) connected to all Vdd pins, and 0V to all Vss pins. Note that Vcap doesn't connect to +v; just to the Vcap (a common mistake). Awaiting your feedback to the above . . . . |
||||
Page 1 of 2 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |