I’m having trouble working out which backlit LEDs are fixed to on-board definitions with on-board sizes for LED output. I need to support Katana, Cyrillic, Pinyin and where appropriate, abugida as well as Latin & Greek as well. In short it’s an ultra low-cost solution so JUST managing the specification is important.
I can remember having to use 12 x 12 pixel fonts for katana but i’m not sure just how big I should budget for. 256 pixels wide by 64 pixels high with 5 (or 6) on-board buttons looks promising and from what I have read, the screens have their own static RAM so only changes need rendering.
I have a truly tiny hardware (including CPU) budget which has seen me staring at code fragments for days trying to speed things up. Put simply, if I can do this on an Arduino Uno M0 (48MHz Cortex M0) rather than an Arduine Due (84MHz Cortex M3) then the project becomes profitable.
I might add that I am not getting the money. The money goes on expending the service worldwide.
I have coded everything from the Intel 4004 to the Elbrus 8S and I have to say that the Thumb instruction set is seldom fun to code. I HAVE however found some tricks people may like to try out.
Note that bits [0:7] in Rs are the rotate count (not like 0:4 as you might expect give 0-31 are valid for immediate values). So as an example:
LDR R0,#$28 //read value including a rotate value of $28 (within bits 7:0]
RORS R0,R0 //Rotate entire register using value in bits [7:0]
MOV R0,R0 //Rotate limited by register size [4:0] so get result
The above isn’t an amazing example but I hope people can pick up on the fact that the Shir/Rotate instructions execute if a different manner depending on their second field. I haven’t sat down and worked out a list of what 32-bit values this oddity can calculate but defining a 32-bit value in 32-bits is surely of interest to those wished to make smaller/faster code.
I discussed the M0+ design with joseph yiu and he pointed out that the SBCS using NOTC was to save transistors. That made me wonder just how many transistors a ROR using 8-bits worked. I can only suggest that it must have used ZERO transistors.
I also asked him if the change between v4T & vT5 in it no longer altering C & V was an optimization. He said it was to save transistors.
Steve Furber was also worth an E-mail. He said that the v5T & v6T had to use LESS transistors that original Thumb so they really were going-for-broke in terms of costings.
Other that this SHIFT Rd,Rs (which they said was to save transistors), about the most powerful feature of the design is the asymmetrical PUSH & POP. Ideal for switches in C. You can stack & store PC or unstack and set up IP really fast. I also pointed to the fact that the SP has so many unique addressing modes. I haven’t really used this stuff ‘in anger’ i.e. in code I need to be fast BUT you have to admit that being able to set up R0-R7 & set up PC looks pretty powerful.
I had in fact been annoyed because there is so little that the hi registers can do i.e.
1-Move contents to/from another register.
2-Add contests to another register.
3-Compare contents to another register.
So yes, using SP as a global addressing register makes sense but it also means that debugging might be problematic BUT at least I woke up to a new sense of purpose.
Anyway - a cheap LED screen (ideally one that just plugs in) would very much be appreciated. I am afraid to say I am lost when it comes to hardware.
Many thanks to you all,
PS My signed 32-bit x 32-bit —>64-bit signed result code fragment uses 18 cycles (and 18 Thumb v6T instructions). I’m not asking anyone for anything free but I would appreciate in knowing if someone has found a faster route. The C → bit-16 takes 3 instructions and I have been staring at it for days thinking 'I’m sure a good coder could do a better job).
PPS After A protracted period of coding super-scaler Arm A53 & Arm A57 it it’s come as quite a shock I can tell you. If only I was as famous as Sophie Wilson. She plays a game called ‘Fantasy Instruction Set’ and I’m betting a lot of people on here would love to be given that chance!