Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:09 01 Aug 2025 Privacy Policy
Jump to

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 : using OpenLog with the micromite

     Page 1 of 3    
Author Message
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 02:19pm 13 Mar 2019
Copy link to clipboard 
Print this post

prompted by grogster's earlier post, i've just acquired from ebay a few OpenLog boards:
https://www.thebackshed.com/forum/forum_posts.asp?TID=11187&PN=2#131435

while i've not experimented with them yet, these seem to almost completely solve the problem of talking to an SD card using an MX170 micromite. however, it would be rather neat to be able to also load programs from (and save them to) the SD card.

what extensions to mmbasic do folks reckon would be required to load/save programs via a peripheral, such as the OpenLog, that was attached to a serial port? would it be sufficient to have:
AUTOSAVE [port$, baudrate, command$]
and
LIST [port$, baudrate]

where port$ is "COM1" or "COM2", and command$ is the preamble required by the OpenLog to initiate it streaming the file to be loaded?

if AUTOSAVE were allowed within a function that resided in the library, then the above two sequences could easily be enclosed in library function wrappers.


cheers,
rob :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 10:27pm 13 Mar 2019
Copy link to clipboard 
Print this post

The ones I got, were from AliExperess here.

DO NOT buy these ones. I threw out all four. They are electrically intact, but the MEGA8 is not programmed, so they are essentially useless - unless you want to solder thin wires to the QFP chip and hookup the Arduino IDE and import the code, and compile and download it to the chip.

A total waste of time, IMHO, for a $3 module.

Please post YOUR link, Rob, as your ones obviously came programmed and can be used.
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 01:07am 14 Mar 2019
Copy link to clipboard 
Print this post

these are the ones i got:
https://www.ebay.com/itm/232453015596

note that i have NOT powered them up yet, so they may be unprogrammed like yours. but don't throw your ones in the bin yet, as they may well be recoverable. the 4 pads above the text "OpenLog" expose the 328p programming pins in case the device is completely blank. also, the 328p may already have the serial bootloader present, in which case you can use the arduino IDE to upload the OpenLog sketch from github via the serial port.


cheers,
rob :-)
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 11:52am 14 Mar 2019
Copy link to clipboard 
Print this post

The sparkfun openlog links seem dodgy at the moment but I found this .ino

ino for openlog

I am wondering what the spi pins are for though, if it uses simple serial i/o. ??
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 12:16pm 14 Mar 2019
Copy link to clipboard 
Print this post

MISO, MOSI, SCK and RST are used to get code into a blank atmel processor, much like PGC, PGD and RESET are used to program a blank pic32. the required programmer for atmel chips is an AVRISP mk2, one of which i just happen to have sitting on the shelf here :-)

my OpenLog units seem to be blank too :-( if i get a chance over the next few days i'll attempt to get a bootloader into them.


cheers,
rob :-)
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 12:25pm 14 Mar 2019
Copy link to clipboard 
Print this post

  Grogster said   I threw out all four.


A tad rash grogs! I would loved to have been a fly on the wall when you blew that fuse
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 02:22pm 14 Mar 2019
Copy link to clipboard 
Print this post

progress: at 1:30am i managed to completely brick an arduino UNO. then, after much tinkering and head scratching, at 3:15am successfully uploaded a new bootloader to it using the AVRISP mkII and arduino IDE.

the box containing the AVRISP also had the packing list from mouser, i bought it in september 2010. today is the first time i used it!

tomorrow will attach the necessary wires to an OpenLog and try flashing the bootloader.


cheers,
rob :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 10:47pm 14 Mar 2019
Copy link to clipboard 
Print this post

  CaptainBoing said  
  Grogster said   I threw out all four.


A tad rash grogs! I would loved to have been a fly on the wall when you blew that fuse


Well, the language was a little colourful, but I was more swearing at myself then the seller. It is a well known and proven fact that if something seems too good to be true, it often is. They were $3 a module, the authentic Sparkfun ones are $15 a module. There is a reason.

I DO have a genuine OpenLog unit I bought from Sparkfun years ago, so I dug that out, and it works beautifully - as you would expect.

@ Rob: It's that kind of hassle I don't need, and is a perfect example of why I won't be trying to upload the firmware to my blank ones. I don't need that level of stress and late nights that you have obviously just had, to get the bloody things working.

Also, I don't have ANY Arduino programming tools at all, as I have been PIC-based since day-one.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:24am 15 Mar 2019
Copy link to clipboard 
Print this post

The AVRISP is very, very simple to use.

The Arduino IDE ... simple, but has had some oddities over the years. Still beats Mchp tools by a mile in many ways.

You do not need to use the IDE.

Sadly the MEGA chips are terribly low in resources, but good for what they do.

Have another try maybe.

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 10:04pm 15 Mar 2019
Copy link to clipboard 
Print this post

I used to have a thing for programming the MEGA8's used in DIL format in the TellyMate TV adaptor I was using for a few years. Your post has made me have a rethink. Perhaps I can re-research what I was using for that.
I see that the OpenLog also uses a MEGA8 chip, just in QFP footprint, so I think I will look into this a little more.

I'm notorious for doing this - sadly.
I biffed all the HC12's that were off-frequency when I found them, and then a member said I should not be so hasty, and so retrieved them from the bin, and put them in a little pottle of their own clearly marked as the clones. I do still plan to use these for my own projects around the house, or for my train-controller project - if I ever get that one finished!

EDIT: I found the PCB pattern for the MEGA8 programmer from eight years ago:





This was single-layer, and eight years ago, so it is not as neat as my recent designs.

It obviously worked from the printer port. I have no idea now what application that would have been, but I suspect it was a 3rd party programmer and software. I would not have designed this circuit, I would have found it on the net and just done the layout for it.

I wonder what LPT software programmer I would have been using?
Anyone got any ideas?Edited by Grogster 2019-03-17
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 11:47pm 15 Mar 2019
Copy link to clipboard 
Print this post

Oh, that's quite old.

You could program the ATMEGAs via a PC's parallel port - back when there was one.

Now you'd probably use a USBASP like this because USB is quite widespread. And they cost about $1.

I tend to use avrdude as the program talking to the usbasp. (You can do it via the Arduino IDE if you like but I tend to use it without the IDE.)

JohnEdited by JohnS 2019-03-17
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 12:22pm 16 Mar 2019
Copy link to clipboard 
Print this post

i believe you can also use any arduino board as an AVRISP, so making a programmer is now as simple as running a few jumper wires.

now have the optiboot bootloader flashed onto two of the OpenLog units. the four vias above the word "OpenLog" are (from left to right) RESET, SCK, MOSI, MISO. Vcc and ground also need to be connected to both the target and the AVRISP.

with the bootloader installed i've been able to uploaded the 'blink' test application via the serial port - this just sits there blinking the (blue) led attached to PB5.

next step: work out how to compile the OpenLog 4 firmware.


cheers,
rob :-)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 01:08pm 16 Mar 2019
Copy link to clipboard 
Print this post

I think that's essentially correct (maybe some caveats as to the CPU as more than megas are supported now).

John
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 03:06am 17 Mar 2019
Copy link to clipboard 
Print this post

now have verstion 4.2 of the OpenLog firmware compiled and loaded onto one of the boards - it seems to work pretty well, though have only done quite limited testing just through a terminal emulator and at only 9600 baud. documentation is a tad sparse to say the least, but then the number of commands is quite limited.

is anyone else interested in tinkering with OpenLog? if so, i'll attempt to put together a bit of a guide on getting a blank units that lacks even the bootloader fully up and running.


cheers,
rob :-)
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 03:23am 17 Mar 2019
Copy link to clipboard 
Print this post

YES, I would be interested in that, as I know pretty much NOTHING about Arduino or Atmel programming. I am all PIC stuff.

It seems like a little more trouble then I would have hoped for, to program the firmware into them.

I cold rustle up a PCB jig to hold the clone OpenLog units, to make programming easier - pogo pins perhaps?

What I would need to know is:

1) What do you have to connect to where on the clone modules
2) What programmer do I need to have
3) What programming software or IDE do I need to have
4) Can I use a pre-compiled HEX type file, or do I have to complile from the source in the IDE and program from there.

Novice questions, sorry, but I have hardly ever touched Atmel processor chips.
Smoke makes things work. When the smoke gets out, it stops!
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 06:10am 17 Mar 2019
Copy link to clipboard 
Print this post

I was wondering if it would be feasible for one of the clever C programmers to take some of the SC card routines from the Micromite plus and put them in a 28 pin Micromite (with no MMBasic) with a bit of extra programming to make an Openlog work alike? Then we could stick to PIC products. Somebody could then make a board for it.

Much too much for me I'm afraid.

Bill


Keep safe. Live long and prosper.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 06:19am 17 Mar 2019
Copy link to clipboard 
Print this post

I did ask one of our members a few days ago, but he was not interested - and that is fair enough.

OpenLog will do the job nicely - once you program the blank clone.
Bu weather that is worth the time, is another thing.

I have toyed with the idea of making a PCB that just has the E64 chip and an SD card on it, to act as a SD card host, but the 64-pin chip is six bucks alone, and the complete clone OpenLog module is half that price, so.....perhaps it is worth the effort to program the blank clones.

I just find myself a little lost, as I don't do ANY Atmel processor stuff, so I know nothing about them, how to program them, how to drive the IDE - nothing.

However, if Rob comes to the party here on his suggestion of making some instructions, I might be able to learn something new, which is always a good thing!
Smoke makes things work. When the smoke gets out, it stops!
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1642
Posted: 06:30am 17 Mar 2019
Copy link to clipboard 
Print this post

Pity, the learning curve would be too steep for me. I'd rather pay the price for a working version.

Bill
Keep safe. Live long and prosper.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 06:39am 17 Mar 2019
Copy link to clipboard 
Print this post

Don't despair.

If Rob and I can work something out, I can probably offer programmed clones on my website - which would still be cheaper then the Sparkfun ones which are US$16.

....although, I see they are currently on special for US$12 each.
Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 08:50am 17 Mar 2019
Copy link to clipboard 
Print this post

Most of the cheap versions on ebay explicity say they have the firmware loaded

e.g.

Perhaps Grogster just got a bad batch
 
     Page 1 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025