![]() |
Forum Index : Microcontroller and PC projects : Introducing the Pi-cromite: first steps
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Ctrl Z, then back into mmbasic (with ILI configured) lets me do GUI TEST LCDPANEL (and circles appear) However, running the program (which only draws the time$ on the TFT) gives Pin 19 error. It is as if something is trying to re-configure the TFT and hence displays this message. WW |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
24 and 26 are the hardware controlled chip select pins for SPI. I've turned them off in the software but it is possible there is still some sort of interaction. Try using other pins. To clean up fully i.e. restore options to default, type [code]rm .options [/code] at the command prompt Master only I'll include a SYSTEM command in the next release which will enable you to call any external program Other useful commands for Linux newbies (like me) ps -aux lists all active programs, allows you to find versions of mmbasic still running if you close a window without exiting mmbasic first kill -9 nnnnn stops process with ID nnnn. mmbasic seems to have 2 processes which need to be stopped with IDs 4 apart ls -al lists directory including hidden files - allows you to "see" .options |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Tried the rm .options then re-configured with three other pins (remember that it worked ok in a9 with 20,22,24 AND GUI TEST LCDPANEL worked in a11. I have uncovered the following which may be a clue for you. In a11: Define OPTION LCDPANEL ILI9341,L,a,b,c Whichever pin you seem to use for 'a', You then get the error message Pin a is reserved on startup This message appears even if I try loading a program! WW |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Reverting back to version a9 and all works ok ![]() EDIT: By the way, this is on Pins 22,24 & 26 again |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
I sometimes use CTRL-Z to exit MMBASIC, but then when I try re-run it, it won't start due to a gpio issue: gpioTick: pigpen uninitialised, call gpioInitialise() IF I then try using kill -9 nnnn (with nnnn identified via ps -aux) then I get Operation not permitted ![]() So only way I can currently start MMBASIC again is to re-boot RPi. I have privileges set (I think) so not sure if something wrong here too. WW |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
use sudo kill -9 nnnn |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
I hope this is correct this time. The problem is that in the Micromite when you change an option (the ones that are saved), the program actually does a complete restart which means all of the variables that are set as part of program initialisation get reset. In the Pi-cromite a change of option (or CPU RESTART) does a jump to the beginning. This reruns all my code but doesn't reset the variables that are set during normal program initialisation. This means that I have to reset all these as part of the user code before jumping to the restart point. I probably still haven't got all of them but this version should cater better than previously. It is still an alpha release and all bug reports are very much appreciated - so do please try and break things (except WW who can do it without even trying ![]() 5.3.a12 2017-04-29_191141_mmbasic.zip |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Loaded a12 fine - and ILI9341 is running fine ![]() I take it this is the 'previous IR' release (a11) so I can now test all the IR functionality ![]() Looking for my TSOPs right now . . . WW |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
OK - here I go . . . If I run a program (RUN) at command prompt then the program runs as expected. I then press CTRL-C and command prompt reappears, Now if I press Ctrl-C immediately again the command prompt disappears; however I can then type RUN again BUT then get the 'Error: failed to open file' message. So can Ctrl-C please always return a Command prompt '>' rather than a 'blank line' to avoid this message. Hope this makes sense . . . WW EDIT: To clarify, pressing Ctrl-C at the command prompt '>' returns a '^C' being displayed on the next new line (and places the cursor on the next line underneath with nothing displayed in first character position). Anything typed on this 'blank line' returns the 'Error: failed to open file' message EDIT2: Pressing Enter on a blank line returns the '>' cursor and all is fine again . . . |
||||
sagt3k![]() Guru ![]() Joined: 01/02/2015 Location: ItalyPosts: 313 |
Hi matherp I made compatibility tests with AllWInner H2 CPU, "board OrangePI Zero" ![]() ![]() 2017-04-30 22:16:45 gpioGetMode: pigpio uninitialised, call gpioInitialise() 2017-04-30 22:16:45 gpioSetMode: pigpio uninitialised, call gpioInitialise() 2017-04-30 22:16:45 gpioSetAlertFunc: pigpio uninitialised, call gpioInitialise() 2017-04-30 22:16:45 gpioSetPullUpDown: pigpio uninitialised, call gpioInitialise() 2017-04-30 22:16:45 gpioSetPullUpDown: pigpio uninitialised, call gpioInitialise() 2017-04-30 22:16:45 gpioSetPullUpDown: pigpio uninitialised, call gpioInitialise() It is obvious that pin management will be different but it is to let you know that what you are doing is a great job. ![]() Thanks sagt3k |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4033 |
H2 is ARM, so of course mmbasic runs. But H2's not RPi so does pigpio support it? The I/O is different, though the CPU is ARM (a different version, but ARM). ARM is the CPU. I/O is decided by the chip maker - Broadcom for RPi, Allwinner for H2. If pigpio does not support H2, very possibly it could... John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
Attached 5.3.a13 2017-05-01_072002_mmbasic.zip Changes: Speed improvements for LCD displays Implemented LOAD IMAGE Known issues: ctrl-C at command prompt (why?) needs CR pressing before next command is accepted properly Colour palette on 480x320 ILI9481 TFT incorrect (on my display).I'm unsure if this is a problem of the ILI9481 initialisation sequence (copied from working code) or a hardware fault in my display (cheap knock-off copy). The colour codes being sent to the display are definitely correct. If anyone has this display please try [code]for i=0 to 255:line 0,i,479,i,1,rgb(i,i,i): next i[/code] and let me know the results |
||||
Micro-80 Newbie ![]() Joined: 03/03/2017 Location: Russian FederationPosts: 26 |
Great job! I have some questions. Is SPI1 supported? Is the COM port supported in the current version? |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
Yes: standard MM syntax No |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
Please find attached 5.3.a15 2017-05-02_181242_mmbasic.zip New features are the SYSTEM command which can be used to execute LINUX commands e.g. SYSTEM "ls -al" This release also includes support for two uarts COM1 and COM2. Syntax is as per the Micromite and print #, input #, line input #, and input$ should all work as normal Pins are COM1-RX 10, COM1-TX 8, COM2-RX 11, COM2-TX 7 The parameters supported are baudrate (1-115200), buffer size (defaults to 2048), interrupt routine and number of characters before the interrupt. All transmission is 8N1. DE, 9BIT, INV, OC, and S2 are not supported, nor is IEEE-485 Note the input is buffered as per the Micromite but the output is blocking. The RX pin is not pulled up in software so this may be required in H/W if the pins may be left disconnected with the serial port open. Remember the Pis are 3.3V ONLY!! Bugs fixed: EOF, LOC, and LOF now work properly for both files and serial output. Note: LOF will return 0 for serial output as the serial output is not buffered. SEEK is also now working for file I/O. |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Hi Peter, The SYSTEM command sure looks very interesting ![]() Please can I ask: where is any 'reply' to the SYSTEM command sent too? I am impatient to know whilst I'm busy downloading this version to upgrade my test RPiZ ![]() WW |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Peter, If you have a long program (more than one screen's worth of code) and type LIST at the command prompt, then the 'PRESS ANY KEY ...' message only responds to the ENTER key. IF you press any other key then 'that' character is displayed instead. IF you were to hit character, space, character, then ENTER you will get a 'Error: Failed to open file...' message upon hitting ENTER mid-listing. This is on version ...a15. Not sure if issue in earlier versions ![]() WW |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10197 |
5.3.a16 2017-05-03_070945_mmbasic.zip I've implemented LIST ALL as an option on LIST and also changed the prompt to require an enter. The issue is to do with the way LINUX buffers stdin and I can't find a way round it at the moment |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Thanks (you took your time to fix that one!) ![]() |
||||
dasyar Regular Member ![]() Joined: 13/04/2015 Location: United StatesPosts: 58 |
I have not been here for awhile, and I was surprised to see the RPi being addressed. Very interesting developments so far, it just might get me interested again, in using mmbasic. I just noticed that there are two COM ports that are made available, will there be any attention given to Bluetooth? I could see a project, using the RPi zero w, that just uses the Bluetooth for COMS with other units. In other words, do not use the WiFi. |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |