ArmmiteF407 V5.07.02 betas - Library - No Battery and more.
Author | Message | ||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3059 |
Like certain JPGs. The forum seems to do a better job with GIFs. |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 864 |
A few tweaks and the source now on GitHub. Armmite F4 5.07.02 Beta 2 multi line comments /* */ added as per picomites Using \\000 and \&00 (with OPTION ESCAPE) give error message to use CHR$(0) as per picomites SPIClose() added before AppendLibrary incase left open by flash write fail, which then gives misleading error. Fix for potential FILES error identified by Peter. BACKLIGHT command syntax updated to match Picomite BACKLIGHT value[,DEFAULT|REVERSE] Fix for OPTION ANGLE not defaulting to RADIANS on new RUN command. Fix for OPTION ANGLE not in function TAN() Fix for OPTION ANGLE not in function MATH (ATAN3 x,y) Source now available on GitHub https://github.com/disco4now/ArmmiteF407 Manual and Firmware Armmite F4 Manual.pdf ArmmiteF4_5.07.02beta2.zip Armmite H7 update is close! Regards Gerry |
||||
andreas Senior Member Joined: 07/12/2020 Location: GermanyPosts: 188 |
Hi, many thanks for everything! I tested the CPUSpeed() Example-Library-CFunction on page 61 of the Armmite F4 Manual and it freezes the system. Not the definition as library but the execution of CPUSpeed(). "..As an example you could save the following into the library: CFunction CPUSpeed 00000000 3c02bf81 8c45f000 8c43f000 3c02003d 24420900 7ca51400 70a23002 3c040393 34848700 7c6316c0 00c41021 00621007 3c03029f 24636300 10430005 00402021 00002821 00801021 03e00008 00a01821 3c0402dc 34846c00 00002821 00801021 03e00008 00a01821 End CFunction This would have the effect of adding a new function (called CPUSpeed) to MMBasic. You could even run it at the command prompt: > PRINT CPUSpeed() ARMmite MMBasic Version 5.07.02b2 -andreas |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 864 |
Yes that CFunction would be for PIC Micromite so wont work. I will update the manual with a more generic CFunction , but its just meant to show the idea that CFunctions / CSubs can be added to the library to extend functionality. Gerry |
||||
Bernie3D Newbie Joined: 02/08/2023 Location: United StatesPosts: 17 |
Gerry Thanks for this update. Your effort is much appreciated. Bernie |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5962 |
Armite F4 Manual. The example code uses the back tick for comments. and on page 70, the example for OPTION VCC has the curly quote instead of single quotes. These can cause grief when copy and pasting code to upload. If possible, can you convert all singe quotes to the ASCII single quote. Not everyone uses MMEdit with auto-convert turned on. Jim |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5962 |
A bug for you print datetime$(epoch(now)) Error : 1702129568 is invalid (valid is -2147483648 to 2147483647) > print datetime$(1) Error : 1 is invalid (valid is -2147483648 to 2147483647) Something for when you have the time... Jim |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 864 |
Thanks, Fixed in next beta for both ArmmiteF4 and ArmmiteH7. Not so hard when they are already fixed in the Picomites! Gerry |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1912 |
As per the PicoMite Beta thread ">>" adds only 0s on the left. The Manual indicates if bit 63 = 1 then 1s are added. I see benefits for both ways, but manual and firmware should agree. Edit CMM2 manual says it uses ">>>" for what the F4 and Pico manuals describe and ">>" for what the F4 and Pico do. MMB4W same as F4 and Pico, and ">>>" gives 0 on all 3. Edited 2023-12-09 14:57 by phil99 |
||||
disco4now Guru Joined: 18/12/2014 Location: AustraliaPosts: 864 |
Below is from the Micromite manual. The SHIFT operators treat the 64bit number as unsigned. The CMM2 looks like it can handle either treating it as 64bit signed or unsigned. The F4 manual used a lot of the CMM2 manual so probably how the description got changed. H7 came from F4 manual. They all actually operate as per the micromites, so manuals need to be updated. The Picomites likely have the same history so just need the manual updated. All the manuals have the section 64-bit Unsigned Integers as below, just the description of the shift operator needs fixing. 64-bit Unsigned Integers The Micromite supports 64-bit signed integers. This means that there are 63 bits for holding the number and one bit (the most significant bit) which is used to indicate the sign (positive or negative). However it is possible to use full 64-bit unsigned numbers as long as you do not do any arithmetic on the numbers. 64-bit unsigned numbers can be created using the &H, &O or &B prefixes to a number and these numbers can be stored in an integer variable. You then have a limited range of operations that you can perform on these numbers. They are << (shift left), >> (shift right), AND (bitwise and), OR (bitwise or), XOR (bitwise exclusive or), = (equal to) and <> (not equal to). Arithmetic operators such as +, -, etc may be confused by a 64-bit unsigned number and could return nonsense results. To display 64-bit unsigned numbers you should use the HEX$(), OCT$() or BIN$() functions. For example, the following 64-bit unsigned operation will return the expected results: X% = &HFFFF0000FFFF0044 Y% = &H800FFFFFFFFFFFFF X% = X% AND Y% PRINT HEX$(X%, 16) Will display "800F0000FFFF0044 SHIFT OPERATORS These operate in a special way. << means that the value returned will be the value of x shifted by y bits to the left while >> means the same only right shifted. They are integer functions and any bits shifted off are discarded and any bits introduced are set to zero. Edited 2023-12-09 16:39 by disco4now |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 425 |
Using voice input on Google for 64bits in decimal is quite amusing. Sometimes I need to word it in a particular way but when I get a speach response |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 1912 |
There seems to be a discrepancy between the functioning of Bitbang Bitstream and the manual.In this thread The longest interval I can get is 3mS but the manual says 65.5mS. |
||||
PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 425 |
Arrrgh, Phil. You made me see my "speach" typo I suspect that several time-related issues are not correct, in the documentation. Can't really expect the devs to check everything. I'm working with the H7 and there's a couple of things I'd like to test and I'll post the findings (gotta focus on the main development for now). I already found that the max Baud is 3Mb and I suspect that the 300KHz CIN might be just a carry-over from one of the other Mites. Edited 2024-03-22 16:24 by PhenixRising |
||||