![]() |
Forum Index : Microcontroller and PC projects : Introducing the Pi-cromite: first steps
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
It was on my "to-do" list but low down - however you have prompted me so... 2017-04-23_075541_mmbasic.zip |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
@matherp Peter, Did you also note the IR problem and Geoff's fix in external.c detailed in this thread ? I have confirmed that the problem exists in the MZ software. Regards, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
Please find attached the latest alpha release 5.3a6. This fixes the bug Jim reported relating to string functions on page 8 of this thread. 2017-04-25_095054_mmbasic.zip remember you will need to make the program executable once loaded to the Pi chmod +x mmbasic you also need to have pigpiod installed on the Pi sudo apt-get install pigpiod finally to run the code use sudo ./mmbasic |
||||
gumath Newbie ![]() Joined: 25/04/2017 Location: AustriaPosts: 10 |
Hello all "MM" enthusiastically I'm new here, but I've been reading this forum for a long time. First many, many, thanks to Geoff and Matherp, for MM_Basic, and TassyJim for MMedit, mostly I use "170", 28Pin) ![]() But now to my problem with basic on the raspberry pi3, No matter what program I start, For example, two LEDs flash alternately, Runs perfectly, but only a certain time, about 30 to 60 minutes, then stood still, Without a fault message. Then ctrl_c, and enter run, the program runs until it resounds after a certain I can always repeat. At two different rapberrys, once pi3 with keyboard and screen and Jessie full version, the second with Jessie Lite over SSH on a WIN10_PC. Both behave the same. Please someone can help me? Since my English is very bad, I have google translate this text Written, excused Thank you and vy 73 de, guenter, oe7gmt ![]() |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
Hi Thanks for the report. The code is an "alpha" so I'm not too surprised there are some issues. Does this still happen with 5.3a6? There a number of changes in that version that could change and possibly improve the symptoms you report. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
Hi Thanks for the report. The code is an "alpha" so I'm not too surprised there are some issues. Does this still happen with 5.3a6? There a number of changes in that version that could change and possibly improve the symptoms you report. UPDATE I assume you were using PAUSE in your program? I've found a possible issue in the pause command when the 32-bit microsecond timer overflows back to zero which happens every 71 minutes. I'm testing this at the moment and will post an update when I'm happy with it. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
Attached is 5.3a7. This fixes a bug in a PAUSE statement that is running when the microsecond clock resets to zero every 71 minutes. 2017-04-26_203331_mmbasic.zip My test program has been running for 4 hours without problem whereas in a6 it stopped in a PAUSE statement. Dim integer a SetPin 40,dout Do Pin(40)=1 Pause 200 Pin(40)=0 Pause 200 a=a+1 Print "."; If a Mod 80=0 Then Print "" Loop |
||||
gumath Newbie ![]() Joined: 25/04/2017 Location: AustriaPosts: 10 |
@ Matherp Hi Peter, In version 5.3a6, all PAUSE commands have been replaced by FOR / NEXT loops, Went through the whole night without interruption. Now test version 5.3a7, with PAUSE command, runs a few hours Through, without interruption. ![]() Thank you for the quick reaction of my problem. ![]() I'm looking forward to testing more versions. With MM_BASIC, on the Raspberry, a dream has come true, Thanks again for the many time you spent on this project have. ![]() ![]() ![]() Thanks again, Vy 73 de Guenter, OE7GMT |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
Now with added I2C ![]() Version 5.3a8 attached: 2017-04-27_173102_mmbasic.zip Before using I2C the pins to be used must be selected with [code]OPTION I2C SDApinno, SCLpinno To use the default Pi pins this would be OPTION I2C 3,5 The pins selected are stored in the hidden file .options and only need to be entered once. They can be changed by using OPTION I2C DISABLE and then re-defining them. Then you can use I2C exactly the same as the Micromite with the following limitations: The implementation does not support 10-bit addressing (i.e. options 0 and 1 only) The implementation is Master only. My test program for reading data from a DS3231 is below I2C open 400,1000 Dim a(6) I2C write &H68,0,1,0 I2C read &H68,0,7,a() For i=0 To 6 Print Hex$(a(i)) Next i Print MM.I2C I2C close |
||||
Justplayin![]() Guru ![]() Joined: 31/01/2014 Location: United StatesPosts: 327 |
Just started playing with the Pi Zero W and have a question... Why does TIMER return negative values? --Curtis I am not a Mad Scientist... It makes me happy inventing new ways to take over the world!! |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
It is either: A:/ MMBasic on the Pi is so fast that due to quantum effects time appears to run backwards B:/ A bug Try the attached 5.3a9 for the fix 2017-04-28_075315_mmbasic.zip |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Hi Peter, I have hooked up an 2.8" ILI9341 to the RPi Zero W and all works. However, the speed seems slow for things such as CLS (slower than a 28pin BackPack). Is this something you would expect at this stage of your 'port'? OR is there something I may be doing incorrectly. Am using OPTION ILI9341,L,22,24,26 as the setup/pins. WW EDIT - Using version ...a9 above |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
The MM code has some clever optimizations that run the SPI channel continuously with no wait states. At the moment the Pi outputs one byte at a time this can certainly be improved but is not at the top of the list Attached is release 5.3a10 2017-04-28_173336_mmbasic.zip This now includes full IR support (IR send and IR receive) as per the MM. IR receive is on pin 16 on the Pi. IR send can be any pin. Also PEEK and POKE are now properly implemented with all the options listed in the MM manual except CFUNADDR. POKE is restricted to changing variable space (simple variables or arrays and strings). PEEK can look at both the variable space and the program space. Attached is tested code for the Pi for reading a BMP180 on I2C. This is a more rigorous test of the I2C support than the simple code posted above. 2017-04-28_173534_bmp180.zip |
||||
sagt3k![]() Guru ![]() Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp I'm trying your latest version "2017-04-28_173336" on Raspbeery Pi 3 and at start I have this error: ------------------------------------ LINUX MMBasic Version 5.3a10 Copyright 2011-2017 Geoff Graham Copyright 2017 Peter Mather Error: Pin 0 is invalid Segmentation fault ------------------------------------ I think it's useful for you Thanks and good job sagt3k |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Same here with Error: Pin 0 is invalid (but I'm not getting the line about 'Segmentation fault') FYI - I had an ILI 9341 configured and simply overwrote the MMBASIC file (and did the 'chmod' command prior to running) WW |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10196 |
Ooops: didn't happen if you had OPTION I2C set so I didn't see it. Trying to clear the I2C pins when they weren't set up Fixed in 5.3.a11 below 2017-04-29_063634_mmbasic.zip |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
THANKS Peter (didn't you sleep again last night!). Will load straight away . . . . |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
FEEDBACK: Loaded ok - ran ok. BUT when I incorrectly typed RUN (forgetting I had to load a program first) it said Error: Pin 19 is reserved on startup. Typed the name of my program (ILI_Timer.bas) but gave an Error: Unknown command. Repeated it and no error BUT also not loaded (as LIST revealed nothing) Typed: Load "ILI_Timer.bas" and Error: Pin 19 is reserved on startup OPTION LIST shows the ILI is still configured after overwriting MMBASIC a9 with a11 (i.e. I have not set up the TFT in a11) I will try disabling, then re-configuring TFT WW |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Had trouble 'DISABLING LCDPANEL' - had to CTRL-Z and go back in then type OPTION LCDPANEL DISABLE. All other attempts kept giving the PIN19 reserved on startup. Upon redefining it, I was ale to load program (LIST showed something) BUT when I run it it gave the PIN19 error again. I am using 22,24,26 as the 'optional' pins for the ILI. Pin 19 is MOSI so guess there is an 'internal issue' ![]() WW |
||||
sagt3k![]() Guru ![]() Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp I confirm that with new version "2017-04-29_063634" now mmbasic for RaspyPI3 is working. Two questions: - I2C work as master and slave ? - Can I start external process as bash etc and Can I read output results ? Thanks sagt3k |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |