![]() |
Forum Index : Microcontroller and PC projects : Armmite F4: programming the firmware
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3299 |
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 KingdomPosts: 3988 |
If you don't need synchronous then you don't care usart/uart. John |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10001 |
See schematic If you post the file I'll have a look |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2137 |
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 KingdomPosts: 10001 |
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 KingdomPosts: 2137 |
top news! Thanks |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3299 |
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 KingdomPosts: 10001 |
Cleared now |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3299 |
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 StatesPosts: 3299 |
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 KingdomPosts: 10001 |
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 StatesPosts: 3299 |
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 StatesPosts: 3299 |
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.) PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
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 StatesPosts: 3299 |
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 KingdomPosts: 10001 |
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 No: sorry they are dedicated for DAC use Yes the ILI9481 Raspberry Pi display is supported. See H7 manual for syntax |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3299 |
Thanks for that. 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 StatesPosts: 3299 |
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 KingdomPosts: 10001 |
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: AustraliaPosts: 1088 |
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 |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |