Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:42 05 Jul 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 : MMbasic 5.3 Requests.

     Page 5 of 11    
Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 08:15pm 20 Oct 2016
Copy link to clipboard 
Print this post

Without understanding the low-level 'mechanics' of how the internal memory/flash is accessed, is there any way of adding external memory in a low cost 'memory chip'?

Just asking the above in case it has not been considered as an option. Note, I am not talking about user 'logging' memory (as discussed before in an SPI chip), but referring to MMBASIC memory similar to the way old 'memory packs' worked to take a home computer from 16K to 48K (but obviously we're needing much more additional memory than 32k!!)

WWEdited by WhiteWizzard 2016-10-22
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:48pm 20 Oct 2016
Copy link to clipboard 
Print this post

I think the available amount of RAM determines how big a program can be as it needs to be in memory first to be saved to flash.
The library is a smart way to circumvent that as it basically allows two 32k blocks of program to be saved.
Maybe this concept can be expanded by allowing more 32k blocks to be saved to flas. But then the amount of available flash becomes a limit.
Having external memory would be a lot slower as data has to be fetched over a serial connection (SPI/I2C).
Going to a bigger chip with more flash would be much easier. That would allow for more then one 'library' bei8ng saved to flash.

Microblocks. Build with logic.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 09:10pm 20 Oct 2016
Copy link to clipboard 
Print this post

  MicroBlocks said  Going to a bigger chip with more flash would be much easier.


I'll leave it to you to tell Geoff its 'easier'

Yes, we ideally need an equivalent from MicroChip of when the MX150 became 'improved' with the MX170; requiring absolute minimal effort from Geoff to port MMBASIC across.

So the MX470 becoming an MX?70 without a considerable 're-write' would be a dream.

Now that Geoff has the well deserved 'recognition' from MicroChip, perhaps he should contact them with a 'request'!

@geoffg: Is it worth you speaking to Microchip to see if they have anything in their pipeline that meets your ideal requirements for a PIC with much more memory? As the saying goes: 'If you don't ask . . . . . .'

WWEdited by WhiteWizzard 2016-10-22
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10201
Posted: 09:32pm 20 Oct 2016
Copy link to clipboard 
Print this post

  Quote   Is it worth you speaking to Microchip to see if they have anything in their pipeline that meets your ideal requirements for a PIC with much more memory?


There are lots of PICs with more memory. The issue is the package. The MX170 is the highest spec chip in a DIP package which everyone seems to prefer. Microchip are perfectly capable of packaging a higher spec core into a DIP but there is probably limited appeal except in the "hobby" market.

The obvious next big change for the Micromite is to move to a PIC32MZ (2048K flash, 512K ram). The problem is that the Microchip libraries Geoff uses are not supported on the MZ range which means it is a huge job to make the change.

Of interest though is that the PIC32MZ2048EFG (64,100,144-pin) have 6 SPI ports so you could also include VGA support on this chip like the Maximite and they have hardware floating point support. I know Kiiid is already working on this chip so I'd be interested in an update on how easy the port is proving to be.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 05:19am 21 Oct 2016
Copy link to clipboard 
Print this post

I did ask Microchip about producing a MX470 style processor in a 28-pin package but they replied that it was not in their plans. The reason given was that the MX470 die was too large for the skinny DIP package but I suspect that another factor is that the sales of PIC32s in the SDIP package are not huge and anyone who wants the power of an MX470 would also need a lot of I/O pins.

Geoff
Geoff Graham - http://geoffg.net
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 01:23pm 21 Oct 2016
Copy link to clipboard 
Print this post

As a very newbie I apologise if I am missing anything obvious or that has been covered before (I have read this full thread) but I would add:
- even more congratulations for a job very well done;
- second robert.rozee's (and another's) request for support for measuring barometric pressure;
- scaling of fonts to allow 1/2 or even 1/4 scales (the current 1 is too small, 2 is too big)? In some BASICs a scale of 1:1 is a "4" so 1/4:1 is a "1";
- support for "." in the Boat Computer font #3 (it is in font #2 but #3 is so much better). I haven't mastered this level of expertise myself yet to create my own (I have a clumsy workaround to draw a circle - not yet working);
- support for the SD card slot on the LCD backpack (I want to be able to log NMEA data similarly to the GPS Tracker)?
- Indexes for the manuals. I know this is very time consuming (I have done it for a 200 page book), and that the .pdfs are searchable, but indexes can be a great help to newbies and when working off hardcopy. It needn't be done by Geoff but they would need access to his ~finished manual.
Thanks, Andrew
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 02:28pm 21 Oct 2016
Copy link to clipboard 
Print this post

Hi Andrew and welcome to the forum.

Yes, barometric pressure is a useful thing to measure but there is a limit to the number of things that you can stuff into the standard (MX170) Micromite. It could be done using a CFunction and I will look into this (unless Peter Mather has already done it?).

Fractional scaling of fonts could be tricky. These are bitmapped fonts and so scaling a font by 1/4 means doubling every fourth pixel - I am not sure that it will look any good but it is worth investigating.

The ArialNumFontPlus font (font #3 in the Boat Computer) does not have the decimal point (and other special characters) because they would make the size of the font impossibly large. The Micromite Plus does have these special characters in the equivalent font (font #6) because it has more flash memory. This is something that you will see often, the flash memory in the MX170 version of the Micromite is stretched to the limit so new features will go into the Micromite Plus (MX470) which has far more flash memory.

Same story regarding support for the SD card. Not enough flash in the standard Micromite but the Micromite Plus does support it.

Yes, an index of the manual would be handy but like many things there is a limit as to what can be done with the time available. There must be some software that could do it - does anyone know of a suitable package (I use Word 2003)?

Note that the pdf manuals are extensively bookmarked which goes some way to providing an index (you might need to configure your pdf viewer to display bookmarks).

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 02:46pm 21 Oct 2016
Copy link to clipboard 
Print this post

  Andrew_G said  
- second robert.rozee's (and another's) request for support for measuring barometric pressure;


There are a number of Basic subroutines already done for the BMP085.
The ones I did 2 years ago still work with the latest MMBasic.
I think the BMP180 works with the same code.

As soon as a particular device is incorporated into the firmware, there will be a new, cheaper, better device and support for the old device diminishes.

When it's done in Basic, updates are easier.

Jim


VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 02:52pm 21 Oct 2016
Copy link to clipboard 
Print this post

I know it's on the list for possible future expansion, but is there any chance of
"Extend XMODEM to save files to the SD card" for the Plus?

Jim
VK7JH
MMedit
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 03:16pm 21 Oct 2016
Copy link to clipboard 
Print this post

Thanks Geoff.
Yes and I agree with what you say (but it is good to get them on a list even if they keep dropping down - or eventually off). I'll persist with my "." workaround.
(The BASIC Draw command has a 1:1 scale of 4).

I too use Word 2003 (and XP with real a serial port . . .). It is not that hard (just time consuming). The key thing is to decide the rules before starting (e.g. how to show multiple occurrences, any hierarchies etc.).
Insert/Index and Tables/Mark Entry - for the field codes
Insert/Index and Tables - to insert an index once you have some field codes

The bad news is that it inserts lots of field codes in the text which you need to be aware of as you subsequently edit the document (i.e. to not delete half a code). If you show formatting with the "¶" button it gets hard to navigate around a big document as this changes the page Nos. (it all comes good as you save and print the document though).
I'd be happy to do a sample if no one else steps up.

Cheers,

Andrew
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2428
Posted: 04:18pm 21 Oct 2016
Copy link to clipboard 
Print this post

geoff:

re: documentation. libre office has become extremely good in recent years, it may be worth having a look at to see if it provides anything more than word 2003 does. moving to libre office would also be a good opportunity to move from a .docx source file to .odt format, useful for when the revolution comes and all microsoft are the first lined up...

the following link also describes an automatic indexing method:
http://www.howtogeek.com/howto/35495/how-to-create-an-index-table-like-a-pro-with-microsoft-word/
i do not know if your current version of word supports this. you basically create a file containing a list of words to be referenced by the index, and this file is used to index every occurrence of said words. this does produce a great deal of excess referencing (much chaff amongst the wheat), but then it may be possible to go through the index and prune back unwanted references (or add a hidden 'do not index' character to each occurence in the main text that is to be ignored).

re: MX170 flash being full. a while back there was talk of producing a compile option for micromite basic that would create a stripped-down version of the interpreter with specialized functionality left out. did this idea ever go anywhere? i really do feel that the MX170 version still has a great deal of life left in it, and would hat to see it sitting at a dead-end because flash has been filled. it is a product that appeals to a certain market segment that the MX470 version simply can not fill.


cheers,
rob :-)

 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 11:10pm 21 Oct 2016
Copy link to clipboard 
Print this post

Yes, I still have plans for a stripped down version - it is just a case of finding the time. I seem to be spending all my current time writing magazine articles but that will finish soon.

Geoff
Geoff Graham - http://geoffg.net
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 05:26pm 22 Oct 2016
Copy link to clipboard 
Print this post

@Tassie Jim,
Thanks and just confirming that the code that you referred to above for the BMP185/180 is at:

http://www.thebackshed.com/forum/forum_posts.asp?TID=7080&PN=4

I'll have a play and get back,
Cheers,

Andrew
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6269
Posted: 08:18pm 22 Oct 2016
Copy link to clipboard 
Print this post

  Andrew_G said   @Tassie Jim,
Thanks and just confirming that the code that you referred to above for the BMP185/180 is at:

http://www.thebackshed.com/forum/forum_posts.asp?TID=7080&PN=4

I'll have a play and get back,
Cheers,

Andrew

Yes. that's the one.
It was written before we had 64bit integers so uses floating point numbers throughout.
That means it should run on anything running MMBasic V4.5 or better.

The routines are a more or less direct translation form the data sheet sample code which used 16bit integers. That's why there are lots of INT and /65536.

Jim

VK7JH
MMedit
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:26pm 22 Oct 2016
Copy link to clipboard 
Print this post

  Geoffg said  Yes, an index of the manual would be handy but like many things there is a limit as to what can be done with the time available. There must be some software that could do it - does anyone know of a suitable package (I use Word 2003)?


Word it's self can generate index's I believe. Think even as far back as 2003.

Tag's might be involved.

I've got at least 2007 & 2010 here, not sure about 2003.

Might have a look at the source file of the manual you sent me some months back & see what's involved.

Phil.
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 12:45am 23 Oct 2016
Copy link to clipboard 
Print this post

@Geoffg -- I've got word 2013 here and some time on my hands if that could help you.

Paul
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 07:29pm 23 Oct 2016
Copy link to clipboard 
Print this post

Hi Geoffg;

The Pin() input function can read the condition on a pin configured as DOUT,
configured as either normal or "OC".
However, the PORT() input function doesn't read pins configure as DOUT at all.

Is it possible to make the PORT() input function work like the
PIN() input function?

redrok
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 09:35pm 23 Oct 2016
Copy link to clipboard 
Print this post

Ah, good one. OK, I will add it to the list of enhancements to be investigated.

Thanks, Geoff
Geoff Graham - http://geoffg.net
 
redrok

Senior Member

Joined: 15/09/2014
Location: United States
Posts: 209
Posted: 08:24am 24 Oct 2016
Copy link to clipboard 
Print this post

Hi Geoff;

That would be nice.

I have a couple of questions about PORT():

1. I see I can't use negative numbers in the nbe field.

uM5.2>setpin 21,dout
uM5.2>setpin 22,dout
uM5.2>port(21,2)=2
uM5.2>port(22,-2)=2
Error: -2 is invalid (valid is 1 to 50)


Is it possible to get PORT() command or function to use
negative nbr values?
I can see that a negative nbr value would essentially
reverse the bit order.
Possibly for both the function and command versions.

2. The Port() command is much faster than flipping bits
individually using PIN() commands.
However, the pins don't actually switch simultaneously.
It takes a couple of uS.

My question is, is there a specific pattern of selected
bits that do switch simultaneously? Say, a set of pins
all associated with a specific PIC hardware port.
I assume your code just processes the bits sequentially.
Is it even possible to flip bits simultaneously?

There are uses for this where timing is critical.
Of course, I can do this with an external register,
but it would be much simpler if the PIC could do it
by itself.

I hope I have explained the well.

Just asking.

Thank you.
redrok
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3282
Posted: 08:30pm 24 Oct 2016
Copy link to clipboard 
Print this post

  redrok said  Is it possible to get PORT() command or function to use negative nbr values? I can see that a negative nbr value would essentially reverse the bit order.

Hmm, this is one of the things that few people would use and could be done in BASIC anyway.

  redrok said  Is it possible to flip bits simultaneously?

The short answer is no. This could be done for a few bits but not enough to be worthwhile. Also, these bits would not be the same for the various chips (28-pin, 64-pin, etc).

Geoff
Geoff Graham - http://geoffg.net
 
     Page 5 of 11    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025