Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:29 26 Nov 2024 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 : PIC32MX1 BASIC CHIP

Author Message
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 08:32am 06 Oct 2012
Copy link to clipboard 
Print this post


Has anybody ever tried out one of these PIC32MX1 BASIC Chips?
It's from byvac.com.
I found it on EBAY while searching for PIC32 stuff.



EBAY Listing:

http://www.ebay.com/itm/BASIC-Computer-on-a-PIC32-microcontr oller-development-Startert-kit-/110927285647?pt=UK_BOI_Elect rical_Components_Supplies_ET&hash=item19d3c80d8f
www.elproducts.com
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 06:20pm 06 Oct 2012
Copy link to clipboard 
Print this post

Looks like the linked site(s) have just been updated,
they mention pic32MX1 but MX2 seems to be, um, in development.
MX1 version uses serial-usb link, and integer and string datatypes only.
"machine basic" looks a bit clunky. Also, the kit makes no mention of low esr capacitor, just ordinary electrolytic.

But I think these type of things will flood the arduino world.
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 03:28am 07 Oct 2012
Copy link to clipboard 
Print this post

  chronic said  
But I think these type of things will flood the arduino world.


I agree
32 bit seems to be gaining momentum quickly in the hobbyist world.
With the launch of the 32 bit Arduino DUE, chipKIT and others it's getting easier to use 32 bit.
One limiting factor was no DIP parts.
Now that's changing with the PIC32 and some Cortex and a few others.

An Arduino is really just a Micro with bootloader installed that works with a free compiler/IDE.
The simplicity of the language is what brought in a whole new crowd of hobbyists/beginners and seem to make it explode in popularity.

I'd love to see a simplified version of MMBASIC on a PIC32MX2 with a USB with focus on the Arduino I/O pins and digital I/O control.
Can't get much easier than MMBASIC for programming.

Has anybody attempted this?

www.elproducts.com
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3801
Posted: 04:40am 07 Oct 2012
Copy link to clipboard 
Print this post

If Microchip really want to get beginners / hobbyists using their chips then DIP is great but they need more RAM. Much more. And preferably more flash. That way things like MMBasic can run on them, and without horrible compromises.

The price of the uC is small and the price difference also would be small, but what you can (or cannot) do depends very much on memory. (Not new, is it LOL)

John
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 08:14am 07 Oct 2012
Copy link to clipboard 
Print this post

I guess, if new chips have enough resources to run small
Basic interpreters, then they will be able to run interpreters for
small (simplified) C...and if the "sketch" language is close enough to
an introduction to C, Arduino will have a pre-existing
base to surf on.
A small C interpreter for pic32's will appear I think.
Haven't seen any evidence though.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:53am 07 Oct 2012
Copy link to clipboard 
Print this post

I am busy with javascript on a pic32 but then with a large number of datatypes as without them embedded is pretty difficult. Javascript is the most used programming language so i hope it will have some value in the mcu world.

I have datatypes such as a bit, nibble, bcd etc all the way to float and 64 bits and 8 bcd's. It will learn the programmer to really think about how much bits (memory) is really needed. Normally in javascript everything is a 'var' which can be undefined, null, an object, a function, floating point number or string. This is why i choose to make a typed version. Much less error prone and much more efficient with cpu and memory resources. Also having many different datatypes makes it easier to use peripherals (mostly 8 bits) and GPIO which can vary a lot so from 1 bit to 7 bit datatypes are available.

I am writing tokenizer and parser in javascript, crockford offered a good starting point with http://javascript.crockford.com/tdop/index.html .

The tokenizer processes a text and spits out tokens (obvious) and does some simple syntax checking. This i have working.

The parser then builds a tree and tries to optimize and minimize and prepares the tree to be interpreted.

I have the simplified javascript parsed correctly, now busy with the optimising by precalculating literals and reserving memory for variables and scopes.

The 'program' will be run by events, not sure yet if i use interrupts directly or use a message system, i lean more to the message system as that makes it easier to abstract it away from a specific processor.

Peripherals will be accessible by Objects. These Object will be specific for a mcu.
Objects like UART, IIc, SPI, PMP, etc can then be written in C or asm and those objects then fire events that the interpreter can forward so that these can be handled by the program.

This event driven model is suited for cooperative multitasking so having a few tasks run would not be too difficult to add. The interpreter would just run a single task and one of its main functions is to be the arbiter for hardware interrupts.

The development will be done on a pc using a IDE, and both the tokeniser and parser will run on the pc. The output from the parser will then be loaded into the mcu and from there it can be interpreted.

The final goal is to have the editor, tokeniser and parser in the mcu too. I choose this road-map to have more 'milestones' to be reached and chopping up a project like this makes it more manageable.

I guess i am 50% with the parser, but knowing programming the first 50% is not the same as the next 50%. :)

Edited by TZAdvantage 2012-10-08
Microblocks. Build with logic.
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 09:01am 07 Oct 2012
Copy link to clipboard 
Print this post

  JohnS said   If Microchip really want to get beginners / hobbyists using their chips then DIP is great but they need more RAM. Much more. And preferably more flash. That way things like MMBasic can run on them, and without horrible compromises.

The price of the uC is small and the price difference also would be small, but what you can (or cannot) do depends very much on memory. (Not new, is it LOL)

John


Package size of the DIE is a factor. They would probably have to increase to a 0.600" pitch DIP part.
I would love to see a 40 pin DIP version of the PIC32MX1/2 in 256K or larger memory and more RAM.

Hopefully enough people use the 28 pin with 128k to show there is a market for a larger memory part.
www.elproducts.com
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 09:06am 07 Oct 2012
Copy link to clipboard 
Print this post

  chronic said   I guess, if new chips have enough resources to run small
Basic interpreters, then they will be able to run interpreters for
small (simplified) C...and if the "sketch" language is close enough to
an introduction to C, Arduino will have a pre-existing
base to surf on.
A small C interpreter for pic32's will appear I think.
Haven't seen any evidence though.


Not sure it would be needed as the chipKIT already gives us a simplified C in Arduino format.
That board I show in the topic New PIC32 Arduino Style Module shows that chipKIT has moved on to PIC32 MX1/2.
I was just hoping there was a BASIC option as well.
This one I found on EBAY doesn't seem to quite cut it.
MMBASIC is what I would prefer.

www.elproducts.com
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 07:57pm 07 Oct 2012
Copy link to clipboard 
Print this post

  TZAdvantage said  
The parser then builds a tree and tries to optimize and minimize and prepares the tree to be interpreted.


Awesome ..

I found it easier to convert to RPN and then process that,
not a universal solution but OK enough.

BTW the most recent version is on the Circuit Cellar article
code ftp site, www.circuitcellar.com, (you can preview)
"article code" ->2012 ->267 ->October.

cheers
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 11:37pm 07 Oct 2012
Copy link to clipboard 
Print this post

RPN works good too. I find it stack heavy and prefer to reserve memory and registers. Stacks are slow because for every operation you would need to pop and push values. When these are already reserved in memory things go much faster. RPN is perfect when memory is very constrained. I am going for speed and fast interrupt responses, in that case speed is essential and every cycle counts. Scopes and closures are actually easier when it is not RPN.

In this case i like a top-down because in the future i would like the tree to also be the source for a 'pretty print' of the source code. Once a tree is fully optimised however the 'pretty print' feature is gone, requiring that a copy of the optimised part of the tree is preserved in an unoptimized structure. Many decisions and tradeoffs. Saving the source somewhere off the mcu chip would be the easiest, like an extra serial ram, that would not be expensive and would free up the mcu ram for runtime. A milestone in this project is a correct unoptimised tree. The next is to interpret that. Maybe if that is fast enough the optimising tree ste can be moved to a later stadium. You need working code first, optimising is an extra step. It is very tempting though because in many cases it is very obvious where you can optimise easy. Like "int a = 5 * 4". That would be "int a = 20" but then the pretty print will confuse the programmer because that is not what was written. The "4" could be a constant defined somewhere else and can be very meaningfull. Once you optimise the dual function of the tree is gone.

I could skip the parser tree building step and change it into a interpreter, it would then 'auto-magically' use some kind of RPN because it would recursively call functions and use a stack. The stack would be the one that is used by the programming language the parser /interpreter is written in. No intermediate step would then be necessary. Still something to consider but depends on the speed it can reach.

An optimised tree can also be a good source for a compiler. But who needs a compiler when there already is a free compiler available. It is the interpreter that makes very quick programming/testing/debugging cycles so quick and easy.

Oh yeah, a debugger. Well once an interpreter is running a debugger with single stepping is a piece of cake compared to that.

Why go through all this 'trouble'. I designed some hardware (http://www.thebackshed.com/forum/forum_posts.asp?TID=5216&P N=1) that is perfectly capable to be programmed in mplab with a pickitx. It would run mmbasic. For sales though you need a unique SP otherwise it is just one of the many.
MMBasic showed me what a good match a mcu is with an interpreter. The market is i think much bigger when a language like javascript is offered. All the web developers can then develop something in the real world. :)
Edited by TZAdvantage 2012-10-09
Microblocks. Build with logic.
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 01:41am 08 Oct 2012
Copy link to clipboard 
Print this post

I used assembler, but now I am considering
rewriting it in C so it can use the other stuff..
the tcp/ip and usb would be nice, but I'm
wondering how much resources they use, eg
the mx2 has 32k mem but it might mostly be
used by the extra usb and tcp/ip etc.
Not sure I want to look at pic32 assembler,
from what I can see most of the dspic SFR's
are similar but the rest is way way different.
 
MicroBlocks

Guru

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

tcp/ip is a memory intensive protocol. When i designed the board i first had the ethernet connections broken out for adding a PHY. After considering the consequences, like giving up several SPI,UART,IIC and PMP peripherals i find the 'cost' of using ethernet very high.
Offloading that to another board is much easier and also keeps the tasks that have to be performed more separated. There are very nice wifi and ethernet options using SPI that will take care off the nuts and bolts of (wired)ethernet/wifi and the protocols on top off that. From a programming view it is then just giving the right commands to those modules simplifying it enormously. The changes for bugs is than also greatly reduced.


Microblocks. Build with logic.
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 05:20am 08 Oct 2012
Copy link to clipboard 
Print this post

  TZAdvantage said   tcp/ip is a memory intensive protocol. When i designed the board i first had the ethernet connections broken out for adding a PHY. After considering the consequences, like giving up several SPI,UART,IIC and PMP peripherals i find the 'cost' of using ethernet very high.
Offloading that to another board is much easier and also keeps the tasks that have to be performed more separated. There are very nice wifi and ethernet options using SPI that will take care off the nuts and bolts of (wired)ethernet/wifi and the protocols on top off that. From a programming view it is then just giving the right commands to those modules simplifying it enormously. The changes for bugs is than also greatly reduced.


Others have discovered that as well and that is why there are several different Arduino Ethernet an Wifi shields that use SPI interface. This is why I like the Maximite having Arduino connectors and why I like the PIC32 Arduino style module I posted though I haven't spent anytime trying to get one to work with Maximite.
www.elproducts.com
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 06:55am 08 Oct 2012
Copy link to clipboard 
Print this post

<rambling thoughts>
I find the idea of shields a good one for hobby uses and prototyping.
Once you want to make a final 'product' you have to buy the shields again in parts and somehow incorporate that onto a board. Stacking is ok for one level, after that it gets unreliable.
What i see in the arduino world is that it usually stops after a prototype because the step to a product is for a hobbyist quit big, i even dare to say impossible.

In the arduino world a mcu board and a shield are end products, and that is what you see being sold. There are no easy ways to take the parts used on the mcu board and the parts used on the shield to have that same functionality on a smaller and cheaper board, that would make a useable product . The 'modules' (mcu board, shield) have to many submodules.

A solution in this segment of the market that makes the transition from prototype to product smooth does not really exist. Having mcu boards with lots of chips or functionality on it that you don't need is just a waste of money and sizes will be larger then necessary. If shields would be made like tiny modules, like pcb modules that are frequently used by the big players you can actually reuse them in many designs.

My goal is to make modules on that level and break them out for prototyping but still have them available as a small pcb that can be soldered on another pcb or as a circuit completely wired on a pcb.

What you then make as a prototype will have a direct counterpart with real parts or pcb 'traces'. If you make these modules small enough you can even graphically connect them in a schematic same like other parts and have pcb footprints for them. Laying out a board will be a lot easier.

Of course you will need some form of standard. IIC and SPI are good candidates for connection to small modules that have a 'brain' of their own. Other modules would need some minimum amount of pins available. I like the way gadgeteer uses their connector types.

Every time i need to make a prototype i find myself using the same things over and over again, and i really had to make them from scratch because nobody sells them.
Every product needed a board designed which has a risk that it not matches the working prototype (things like that happen unfortunately). So i am really making these things to make my own life easier, at the same time i see a hole in the market. And that hole is big enough for a lot of products and players.

I guess i don't like the form factor as these arduino's with shields are enormous. I need most of the time as small as possible. The tinyduino currently on kickstarter is what i like better, but then for the pics.

</rambling thoughts>

Microblocks. Build with logic.
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 07:32am 08 Oct 2012
Copy link to clipboard 
Print this post

@TZAdvantage, you think Arduino is big? Look at my Sanguino:
http://myshed.files.wordpress.com/2012/10/p1070709.jpg

A 40 pin PIC32MX2 with 512Kb Flash would be great (but one without peripheral problems at 40MHz speed).
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
elproducts

Senior Member

Joined: 19/06/2011
Location: United States
Posts: 282
Posted: 07:54am 08 Oct 2012
Copy link to clipboard 
Print this post

  TZAdvantage said   <rambling thoughts>
In the arduino world a mcu board and a shield are end products, and that is what you see being sold. There are no easy ways to take the parts used on the mcu board and the parts used on the shield to have that same functionality on a smaller and cheaper board, that would make a useable product . The 'modules' (mcu board, shield) have to many submodules.



Actually, there are options.
First most Arduino designs are open sourced so they offer the files and schematics to at least give you a head start to making your own custom board.
In addition to this there is the open source software at Fritzing.org.
With Fritzing you can build the design on breadboard and then the 2nd layer automatically creates a schematic and on the 3rd level automatically create a PCB which you can order.

I haven't used Fritzing for more than breadboard layout but there have been examples of people taking it all the way through to PCB.
www.elproducts.com
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:19am 08 Oct 2012
Copy link to clipboard 
Print this post

I have tried to use fritzing and it is not up to the tasks i need. I am not their target customer.

Making a small schematic and have an easy pcb is ok, but ones you need a few more 'wires' it goes totally bonkers. Especially the autorouter fails miserably. But that is not something unique to fritzing, diptrace, and also more expensive autorouters have difficulties with that.

Fritzing has its uses for some projects.
They actually have a very good product for the market segment they choose and do it right.

What i try to accomplish is get that 'arduino', shield and prototype on one board in similar easy steps as fritzing is offering only then by the user using something like diptrace.

The thought behind is that by offering tiny modules for prototyping you create a demand for 'very tiny' modules that can be put on pcbs, and maybe even get orders to make pcbs using those modules.

The need for prototyping modules is already there, creating the next proto-product 'demand' is what i am after. It would be something that is not currently offered and has a change of success. Currently i am doing this by myself so it will take a while before everything is worked out.

Microblocks. Build with logic.
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:32am 08 Oct 2012
Copy link to clipboard 
Print this post

  vasi said   @TZAdvantage, you think Arduino is big? Look at my Sanguino:
http://myshed.files.wordpress.com/2012/10/p1070709.jpg

A 40 pin PIC32MX2 with 512Kb Flash would be great (but one without peripheral problems at 40MHz speed).


A 40 pin module 1" x 2" with a pic32mx795 on it, even with decoupling and crystal, 3.3 LDO, would not be that hard to make. The question would be which of the 100 pins (or 64 pins) do you not need. :)




Microblocks. Build with logic.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024