Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 09:37 28 Apr 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 : Armmite F4: programming the firmware

     Page 5 of 16    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 12:03am 07 Jun 2019
Copy link to clipboard 
Print this post

Thanks. I don't see PA13, PA14, or PB2 on the double headers on the sides. Are they on the top or bottom connectors?

Re UART/USART, I was wondering what the practical difference in MMBasic was between the two.

I'm still having problems reading my large file off of the SD Card. Any idea why I would be getting this--failure to LOAD "filename" after (apparent) success with SAVE "filename":



PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3659
Posted: 05:33am 07 Jun 2019
Copy link to clipboard 
Print this post

If you don't need synchronous then you don't care usart/uart.

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 08:26am 07 Jun 2019
Copy link to clipboard 
Print this post

  Quote  Thanks. I don't see PA13, PA14, or PB2 on the double headers on the sides. Are they on the top or bottom connectors?


See schematic

  Quote  'm still having problems reading my large file off of the SD Card.


If you post the file I'll have a look



 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 09:56am 07 Jun 2019
Copy link to clipboard 
Print this post

Bit confused about this F4 board...

Peter you are probably best positioned to help -
There is a Winbond Flash prom on the board but the CPU itself contains flash. Is MMBasic loaded in the F407 or the Winbo#nd chip? What I am getting at is; are we able to use the winbond storage in our own progs? It is just connected to SPI1 What is in it by default?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 11:23am 07 Jun 2019
Copy link to clipboard 
Print this post

There is nothing in the flash memory. You can easily use it from Basic using normal SPI commands.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 01:02pm 07 Jun 2019
Copy link to clipboard 
Print this post

top news! Thanks
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 08:13pm 07 Jun 2019
Copy link to clipboard 
Print this post

  matherp said  If you post the file I'll have a look


Thanks for the offer. Since someone else has developed half the code I'd rather not post it here. I tried to send you a PM with a dropbox link, but your mailbox is full. What's the best way to get it to you?

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 09:46pm 07 Jun 2019
Copy link to clipboard 
Print this post

  Quote  but your mailbox is full


Cleared now
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 11:35pm 07 Jun 2019
Copy link to clipboard 
Print this post

Is there a 480x320 (or larger) lcd with the footprint to plug into this module?

Or is there a supported 480x320 SPI LCD?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 02:02pm 08 Jun 2019
Copy link to clipboard 
Print this post

Here's my labeling of the usable pin numbers. I didn't include labels for the display or SD, and various others.

Please let me know if any corrections or additions should be made.



PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 03:41pm 08 Jun 2019
Copy link to clipboard 
Print this post

You don't need to worry about pin numbers. Just use the pin names in all of the relevant commands

? tempr(PE2)
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 08:38pm 08 Jun 2019
Copy link to clipboard 
Print this post

  matherp said   You don't need to worry about pin numbers. Just use the pin names in all of the relevant commands

I have a program which runs on pi, H7, F4, and L4 (and formerly on MM-64). It reads in 20-some pin numbers from a file so that it knows what to use on which platform (also DOS where pin numbers don't apply, but I/Os can still be simulated).

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 09:44pm 09 Jun 2019
Copy link to clipboard 
Print this post

With a new cable, I was able to flash a second F4 and get to the ">" prompt with the USB connection. A little experimenting gave some likely clues to my problems downloading a large basic program. Memory shown is 114K. The program is 121K.

If I try F10 and copy and paste the entire program, it stalls at 114K. Makes, sense--all ram is used. If I try F11 and in teraterm, xmodem send the file, it goes to about 93% and stalls--same explanation. If I omit the last 140 lines of comments and use F10, it succeeds (barely--114K-odd downloaded--112K flash used for program, 9K for fonts, 23K free).

So I guess instead of using teraterm I need to use MMEdit and crunch the comments out, especially since the program is likely to grow more.

I suspect this is also the reason why I can SAVE the file to the SD, but not LOAD it--some amount of ram overhead in the load routine. MMEdit to the rescue.

(74K program with MMEdit.)Edited by lizby 2019-06-11
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 11:11pm 11 Jun 2019
Copy link to clipboard 
Print this post

  lizby said  
  matherp said  If you post the file I'll have a look


Thanks for the offer. Since someone else has developed half the code I'd rather not post it here. I tried to send you a PM with a dropbox link, but your mailbox is full. What's the best way to get it to you?

I suppose lizby is talking about a code abortion written partially by yours truly.

That's what happens when you let a Polock ex mainframer from Brooklyn with a propensity for obfuscatory prose write a program for a micro. My half of the code is definitely the messiest.

I am slowly trying to clean the mess up a little bit. When it gets a little bit better organized and if lizby is agreeable we will post it and give you guys a good laugh.

Paul in NY
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 04:07pm 12 Jun 2019
Copy link to clipboard 
Print this post

Trying to set the DAC pins, 29 and 30, as digital outputs fails. May they not be used for digital I/O?

> setpin 29,dout
Error: Pin Px32 is invalid
> setpin 30, dout
Error: Pin Px32 is invalid
>

(For the "invalid pin" message, which I've gotten before, is it possible to print the actual pin number?)

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 04:30pm 12 Jun 2019
Copy link to clipboard 
Print this post

New release:

2019-06-13_022213_ArmmiteF4.zip

New functionality:

Playing FLAC files now supported on the DACs. See the H7 manual for more details.

PLAY FLAC filename$ [,interrupt_on_completion]



Changed functionality:

Major rewrite of SDcard handling. Tested transferring multi-megabyte files over both UART and USB using XModem. Note MMEdit seems less robust than teraterm for this.

Bugs fixed:
Incorrect handling of programs too-big for memory. This should now give an out-of-memory error.
Error reporting of pin numbers for invalid pins

  Quote  May they not be used for digital I/O?


No: sorry they are dedicated for DAC use

  Quote  Or is there a supported 480x320 SPI LCD?


Yes the ILI9481 Raspberry Pi display is supported. See H7 manual for syntax
Edited by matherp 2019-06-14
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 05:18pm 12 Jun 2019
Copy link to clipboard 
Print this post

Thanks for that.
  matherp said  New functionality: ... Error reporting of pin numbers for invalid pins


Wow. 27 minutes from posting the request to incorporation in the new release (if you hadn't already done it).

I think I have one of the R-pi 480x320 LCDs--if I can find it.

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 01:37pm 21 Jun 2019
Copy link to clipboard 
Print this post

My large program runs on the early versions on the F4, but fails with the most recent. When trying to read a configuration file off of the SD, it reads the first line successfully, but further reads have results which come from I don't know where. It took me a while to track this down and isolate it so I provide something to test with.

The first line is read with "Line Input #3,in$", and the second with "Input #3, WeM2,WeD2,SeM2,SeD2". The problem is not, per se, with the switching from LINE INPUT to INPUT--if I strip down to just read the file, the code works (as it does on older F4 releases).

A related odd thing is that after the program fails, "FILES" fails with "Error: Not Enough Memory". "NEW" clears this.

This is what the failing output is:



I've sent a PM with a dropbox link to a zip file which includes the .bas file (with all full-line comments stripped out so that it fits in flash), and two additional files which need to be on the SD card. It is the reading of GEOsets.dat which is off--but that works on prior F4 releases (and H7).


PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8582
Posted: 09:22am 22 Jun 2019
Copy link to clipboard 
Print this post

Please try this version

2019-06-22_192001_ArmmiteF4.zip

The bug was in an optimisation I'd put in for file reading that didn't properly cope with multiple files open for read.
The FILES memory issue was correct. The command needs a buffer to sort the long file names and if a program is using lots of RAM then it can't get the buffer space it needs. I've changed the maximum filename length from 255 chars to 63 chars to reduce the buffer needed so don't use filenames > 63 chars
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1032
Posted: 11:08am 22 Jun 2019
Copy link to clipboard 
Print this post

Just a few of photos of one of my F4's in action.

Simple Tacho for a 1/3 scale traction engine on blocks, made up in sort of a hurry.

Using a Hall Effect sensor with six magnets taped to the 6 spokes of the flywheel.
Just used a Frequency input for today's test which gave 10Hz resolution with reasonable accuracy.

Got it up to about 250 RPM before it started shacking too much.

There is a 5V battery pack taped to the back of the box. Magnets were used for fixing.

I was mainly interested in how fast the beastie was turning. Slowest was about 30 RPM. (1 rev every 2 secs)









ChopperP
 
     Page 5 of 16    
Print this page
© JAQ Software 2024