Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:32 19 May 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 : Pi-cromite: V5.05.01

     Page 4 of 4    
Author Message
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 09:06am 23 Dec 2018
Copy link to clipboard 
Print this post

Hi Matherp

I have a small problem with my GPS
it is a "gsm/gprs/gnss hat "

I work in 115200 baudrate and sometime I receive bad char
in usb mode I have no problem




my program test
Open "com1:115200" As #1
Dim a$ As string
print #1,"AT+CGNSPWR=1"
pause(100)
print #1,"AT+CGNSTST=1"
pause(100)

Do
If Loc(#1)=>1 Then
a$=Input$(1,#1)
Print a$;


End If
Loop


Edited by goc30 2018-12-24
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 11:00am 23 Dec 2018
Copy link to clipboard 
Print this post

  Quote  I work in 115200 baudrate and sometime I receive bad char


Are you receiving a bad character (i.e. checksum incorrect) or is it the output to the screen that is corrupting? All serial I/O on the Pi-cromite is bitbanged as the real UARTs can't be used (the best one is dedicated for bluetooth, the other changes speed when the CPU throttles) so it is best to keep baudrates as low as possible. Nothing I can do about this.

  Quote  Does the Picromite have some kind of buffer that fills up each time you tell it to do something?


No, but you can write code that causes a problem and Linux has buffers that can fill up. Are you printing to a disconnected console or anything similar?Edited by matherp 2018-12-24
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 01:46pm 23 Dec 2018
Copy link to clipboard 
Print this post

Peter on the normal MM you can use Pin 1 to reset the processor
Is there any way to reset Picromite through a hardware pin or software so if say a reset button was pressed then Picromite would reboot
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 01:51pm 23 Dec 2018
Copy link to clipboard 
Print this post

Peter--PM sent re pi-cromite source.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 02:30pm 23 Dec 2018
Copy link to clipboard 
Print this post

  Quote  Is there any way to reset Picromite through a hardware pin or software


SYSTEM "sudo shutdown - r now"

  Quote  Peter--PM sent re pi-cromite source.


After Christmas I'll send it to Geoff to be included on the list of downloads
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 03:38pm 23 Dec 2018
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Is there any way to reset Picromite through a hardware pin or software


SYSTEM "sudo shutdown - r now"

Or to restart (if you have autostart of mmbasic set up): SYSTEM "sudo reboot"
(Although the shutdown with -r option for reboot may be cleaner.)
Edited by lizby 2018-12-25
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 06:52pm 23 Dec 2018
Copy link to clipboard 
Print this post

  matherp said  

Are you receiving a bad character (i.e. checksum incorrect) or is it the output to the screen that is corrupting? All serial I/O on the Pi-cromite is bitbanged as the real UARTs can't be used (the best one is dedicated for bluetooth, the other changes speed when the CPU throttles) so it is best to keep baudrates as low as possible. Nothing I can do about this.


I have checksum error each time,
If I use card with usb output (not by rpi), all frames are corrects
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 06:54am 24 Dec 2018
Copy link to clipboard 
Print this post

After change baudrate (9600Bd), it work correctly
For me it's enough, but I think that Picromite can't work with high speed like 115200 bds
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 02:40pm 24 Dec 2018
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Peter--PM sent re pi-cromite source.


After Christmas I'll send it to Geoff to be included on the list of downloads


Thanks.

If you could, please also include a readme with some notes or links about setting up the tool chain for cross compiling from the PC to the pi. I'm somewhat familiar with the tool chain process from having built them for a decade for the openWrt linux OS for small router devices--but that was mostly plug and play.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 04:48pm 24 Dec 2018
Copy link to clipboard 
Print this post

  Quote  please also include a readme with some notes or links about setting up the tool chain for cross compiling from the PC to the pi.


I used this to get set up. I don't provide support for source/building - sorry.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 07:40pm 24 Dec 2018
Copy link to clipboard 
Print this post

  goc30 said   I think that Picromite can't work with high speed like 115200 bds


Sounds wrong (if using the hardware uart(s), don't know what else may be in use).

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 05:57pm 26 Dec 2018
Copy link to clipboard 
Print this post

  Quote  Sounds wrong (if using the hardware uart(s), don't know what else may be in use).


As per my previous post. Pi-cromite can't and doesn't use H/W UARTs. Pi only has 2, one not on header and the other useless as changes speed when you aren't looking
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 10:49pm 26 Dec 2018
Copy link to clipboard 
Print this post

I suppose just document the practical max where people like the poster will actually find it. 9600 seems quite slow.

John
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 844
Posted: 05:19am 29 Dec 2018
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Is there any way to reset Picromite through a hardware pin or software


SYSTEM "sudo shutdown - r now"


I dont think there should be a space between - and r.
i.e. should be like this

SYSTEM "sudo shutdown -r now"
Edited by disco4now 2018-12-30
Latest F4 Latest H7
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 09:59am 29 Dec 2018
Copy link to clipboard 
Print this post

Correct. Well spotted!

John
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3027
Posted: 01:17am 04 Jan 2019
Copy link to clipboard 
Print this post

  matherp said  
  Quote  please also include a readme with some notes or links about setting up the tool chain for cross compiling from the PC to the pi.


I used this to get set up. I don't provide support for source/building - sorry.


I now have netbeans set up on my laptop and compiling on a Pi 3B+. This was much more complicated than I anticipated. Maintenance of netbeans has been transferred from Oracle to Apache. Apache says it is the biggest chunk of source they maintain, and they are working through it to make sure that all of the many components satisfy the Apache copyright requirements. They have made two releases, but these don't include C/C++. They have a roadmap, but C support is not expected to be released until the 3rd quarter.

I faffed about a good deal, trying guides which were out of date. Finally I used wayback to find an Windows Netbeans 8.2 release with C/C++. It installed with no problem and the rest of the link you provided was good.

So I'm ready for pi-cromite source, when it is convenient. Can you tell me whether your netbeans mmbasic environment is set up for C89, C99, or C++? What other factors do I need to consider?

Thanks.
Edited by lizby 2019-01-05
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 03:40am 30 Apr 2019
Copy link to clipboard 
Print this post

Hi Peter

I install my prog test on Pi-cromite

All seem to work correctly exept "Sprites"
on "SPRITE load", it make an error (buffer in use)
it load image but not sprite

if I run your sprites programme it can't load image"

I put here 2 progs

2019-04-30_134015_pi_sprites.zip
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 08:14am 01 May 2019
Copy link to clipboard 
Print this post

I think there is a bug in your program.

In line 1038 you load sprite 1 and then in line 1056 you try and load it again - this gives the error.

However, you have prompted me to bring the Pi version up-to-date with the latest changes. I'll post an new version in a specific thread when built.
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 425
Posted: 09:50am 01 May 2019
Copy link to clipboard 
Print this post

Hi peter

yes it is my fault, my mega fault!!!


in line 1038, it is juste test to know if sprite function is installed or not
now I add "Sprite Close 1" to unload

in fact I was deceived by the lack of problem on Mz version, and the fact that we can load a file multiple times, I think that it is same for sprites

Edited by goc30 2019-05-02
 
     Page 4 of 4    
Print this page


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

© JAQ Software 2024