![]() |
Forum Index : Microcontroller and PC projects : MMBasic on ARM, worth the effort?
![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Would it be worth having it auto-configure so it "just works"?
This requires a large amount of slog work - fancy doing it? ![]() |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
I don't have the source. As I understand it, it's still not open source. John |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
You can contribute to the port that matherp is doing - flick him a PM to get on the mailing list. This is a small group of beta testers who are trying to port over to the ST chip. Geoff has authorised this port, but it is still closed - you can't release it to anyone else, and only matherp is releasing compiled HEX files for you to test. I am not on the list - I suck at C - but I am watching this thread with much interest. Smoke makes things work. When the smoke gets out, it stops! |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Good progress today: The PWM and SERVO commands are now fully implemented. These improve on the PIC version by making 4 channels available on each timebase so: PWM 1,10000,20,40,60,80 And SERVO 2,1.44,1.66,1.88,2.22 Are both valid. This means we could drive up to 8 servos with no software overhead. Also COM1 and COM2 are both implemented. Com2: is now a full hardware USART rather than being implemented in SW. I think this just leaves SPI, I2C, and Cfunctions as the only major outstanding areas. |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
Brilliant stuff Peter ![]() I can't wait to try this 'beast'! So once SPI, I2C, and CFunctions work is complete, will you effectively have an 'improved v4.6 MicroMite running on the STM32 which will operate much faster? If so, what, if any, downsides are there? Great work . . . . WW |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
The main downside is that the usable chip is 100-pin - there is nothing equivalent to the 28-pin MX170. The big upside is that the quality of the available libraries seem to be excellent. With the combination of Geoff's superb architecture and the libraries available from Tilen Majerle it has proved really easy to do the port. As an example, since my last post 1hr20mins ago, I have fully implemented from scratch a new Basic callable command to output a voltage using the two 12-bit DACs on the STM32F4 Syntax is: DAC number,voltage ' number can be 1 or 2, voltage is a float between 0 and 3.3v DAC number,STOP ' turn off the DAC This is built, tested, completely integrated into Basic and includes full error handling ![]() Here is a little test loop I'm running Dim float x=0,v Do x=x+0.05 v=Sin(x)+1.6 DAC 2,v if x>2*pi then x=0 loop |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
I've just done some testing to see how fast this thing actually is. I changed the step size in the above program to pi/100 so I get 200 times round the loop to output a single sine wave. Doing this my sine wave frequency is 33.2Hz so each time round the loop is taking: 1 sec / 33.2 / 200 = 0.00015 seconds during which time I'm doing: 2 x floating point additions 1 x sin() calculation 1 x DAC output 1 x floating point multiply 1 x floating point compare 1 x loop + all the overhead of the Basic interpreter NOT BAD!!!!!! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2944 |
Now is that a scope OR is it yet another MicroMite powered TFT (CRT?) CFunction you have developed? ![]() Seriously, this is all good stuff Peter. I will PM you shortly to discuss further; I am now sooooo keen to be a tester of this ever evolving beast. And hats off to you Geoff for creating such a great architecture that has made this a 'really easy port' ![]() Great work . . . . . . So what new function you working on now? I will check back here in a couple of hours which should give you enough time to finish whatever it is (and photograph it, and post about it). Can't say fairer than that hey! ![]() WW |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
HOLY EXCREMENT! ![]() ![]() ![]() ![]() ![]() ![]() Wow........ This thing really seems to be rocketing along, as too is the development. As mentioned, I am not on the beta-testing list for this new thing, as I know nothing of C really, but can I ask a question about hardware comparrisons: Q: With the ST port you guys are doing, it would seem to be coming together easy, whereas porting to a gruntier PIC chip seems to be very complicated and difficult. Is that just cos it is Microchip MAKING things difficult? How come the ST port seems to be going so smoothly and quickly? NOTHING is ever that easy! ![]() ![]() As for the 100-pin QFP problem, that is no problem. Many members here, myself included, can help by designing a carrier board 'a-la the SkinnyMite for the 470. As the ST port seems to be going so well, and is so flippin' fast, assuming you guys get everything going as expected on the ST port, is the 470 viable anymore? I know I have asked that before in different words, but I ask again now, as at that point in time, none of the hardware was working - the interpreter was, but nothing else, and the concern was if it was possible to get the interface to the hardware pins working under MMBASIC on the ST. ...OK, so that is two questions... Smoke makes things work. When the smoke gets out, it stops! |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
My take on this is: I've used the STM32 (and other ARM) cpus quite a bit and pushed for them as it became ever more clear the PIC32MZ was looking iffy, then Geoff dropped his bombshell. I'm pleased to see what's happened. I still think Mchp can rescue the mess - if they drop some of their silliness and also fix the silicon. Meanwhile it makes sense to not be reliant on Mchp. I'd only seen the C when it was open source but it's OK and C is C - portable with some effort when oriented at low level stuff, but given the effort, as here, well see the result... I hope Geoff's happy enough as it's fundamentally his code. 100-pin & 176-pin chips are going to be a mite pesky, though. And I think they cost more than the 28-pin PIC32s! John |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
I have not researched the ST part at all, but assume that it is not smaller then 0.5mm pin-pitch? Perhaps the development board IS the board to use for the ST port - end of story? No board to develop then, and photos seem to suggest that most(if not all) pins on the chip are routed out to those dual-row pin-headers either side..... What does the ST chip cost out of interest? Can't be that horrific, or the beta-testers would not even be working with it at all. EDIT: Owwwwww 2400 baud today!(2400 posts) Smoke makes things work. When the smoke gets out, it stops! |
||||
darthmite![]() Senior Member ![]() Joined: 20/11/2011 Location: FrancePosts: 240 |
I have get some ST CPU , they are 0.5mm (solderable with patience). You can get free samples from ST. But really , better get finished board , it cost less ;) For the st407 i get HY-STM32F4xxCore144 , Open407Z-C , and discovery board in the past. All was good , it just depend what you want do. For the st429 i get some discovery and the Open429I-C with BIG LCD ;) Like as for the st407 , it depend what you want do. I made some board myself and really , just for like 1 to 10 PCB , it cost you less to get one with everything on it. Or you are in industry and have allot of money for do every-time new ones ![]() For the actual project with put mmBasic on stm32 , best is to use the st407 discovery who are very cheap and then if you want expand to next generation of st429/st7xx cpu you can get the st429 disco board. But with this chip , i see that CoIde is not the optimal option. ULINK2 from Keil is not supported , it's why i just try the code on disco board who have the integrated ST Link debugger / Programmer. Cheers. Theory is when we know everything but nothing work ... Practice is when everything work but no one know why ;) |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
There are various boards (other than direct from ST) in the $25-35 range as I recall, some with lots of flash etc. Like this one Overall I think they cost more than some of the PIC32s but they're faster with more memory & I/O pins so it makes sense that they would be. I do fancy an RPI version but the porting work is more challenging due to the proprietary I/O, or an Allwinner version. (Or indeed A.N.Other ARM.) Not this week, though. John |
||||
geraldfryjr![]() Regular Member ![]() Joined: 02/03/2014 Location: United StatesPosts: 61 |
I was comparing the schematic's between the two boards and as mentioned there are a few pins that are different. I only have the 429 boards and I am hoping that I can figure out how and where to re-assign the pin numbers to make it work. But wouldn't you know it, I had CoIDE installed but it was a previous build of my OS than this one and I have not gotten to it yet. It never fails that every time in the past that I have needed to get on CooCox to install the IDE, Their site is Down!! I was just looking around on their new revamped site just a couple weeks ago!! Oh well, as soon is it gets back on line, I will get it re-installed and give it a try and get working with the IDE and Discovery board. Darthmite, I have seen what you have done with this board back when I had First got mine last year, Very Impressive Stuff!!! ;) Cheers!! jer :) Keep on DIYin' !!! ![]() |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Get some skin in the game ! Anybody can carp from the sidelines. Anybody can suggest alternatives, but only the committed can commit. Theory is just that. Get involved for real; commit time, blood, effort, toil, and sweat - put yourself on the line ! This is not a spectator sport ! Put up or .... .. Peter The only Konstant is Change |
||||
geraldfryjr![]() Regular Member ![]() Joined: 02/03/2014 Location: United StatesPosts: 61 |
Good news!! I did find my old files For CoIDE 1.7.6 and got every thing installed. I was able to load up and compile a Blinky program and verified that it worked by changing the speed of the Blinky rate and recompiling the program. This for me is very inspiring since it is the First time that I have done anything with this board on my own since I got it!!!! He,he,he,he....Thanks guys!!! Now, I was able to able get the MMB files to compile and upload to the STM32F429 but I haven't been able to verify that it is working yet. I used Versions b3 & b7. I was using Hyper terminal but I am sure that it is not setup properly and I am pretty sure that I don't have the right hardware setup yet as I was expecting it to communicate through the USB cable that is hooked to the ST-Link/USB port. As well as the Com3 option setting for the USB line was not showing up in the Terminal settings either. I also tried using the serial monitor tool in MPIDE as well and I had the same issue with no Com3 port selection and it works just fine with my uC32 board. Hmmmmmm......... Maybe there is a conflict when I loaded the ST USB driver, I will have to hook the uC32 back up and see if it still works now. However I did try monitoring PB6 & PB7 on the Discovery board using my scope and I saw no activity there either except for just a high signal of 3v or so. Being that all of this wiped out the original Demo that was in it, I did find my original Hex file and uploaded it verifying that the STlink Utility does work and it is back to square one now. Not bad for one evening of just a few hours and there's even more that I can be exploring now. I had Zero issues with this compared to my First few try's using MPLABX and MPIDE!!! He,he,he,he jer :) Keep on DIYin' !!! ![]() |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Another board to consider is the STM NUCLEO-F411RE. Not as fast as the Discovery F4 or F429 but super cheap and you can plug in boards meant for adruinos. I think you can update firmware with a simple drag and drop for the desktop. Coocox doesn't do F411RE yet but Eclipse can certainly be set up to program it. I'm learning my way around it as time allows. Visit Vegipete's *Mite Library for cool programs. |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |