Timing conflicts with servo and serout on 08M2+


Well-known member
Hi AllyCat,

I can see there is a big gap in my knowledge. I did find a similar data sheet, but that is for the display, and I cannot make head or tail of it

I am interfacing via the firmware chip on the AXE 234, using those 254, xxx commands. I cannot see how to relate the information on that data sheet to a three digit decimal number to put in those commands.

As I mentioned, there is a short list in section 3 of the manuals, and a different set on the AXE134 data sheet.

Merging the two gives me a slightly longer list, even a couple where Slightly different functions are described for the the same instruction number.

Certainly that 8 digit gap is upsetting, as in transmitting the ppp_filename inserted by the preprocessor, I don’t see that there is much I can do to edit it to display without those gaps. I am wondering what Hemi does about that.

But most puzzling was that following a suitable delay to read what I could see, sending the 254,1 command did seem to clear the display as described, but further commands to select a cursor start point did not result in the expected result and often data appeared to be at least partly in that 8 character gap so could not be seen.

One of the tables (p.41 of section 3) says 254,1 clears display and moves the display window to position 1, the other (AXE134 data sheet) says it just clears the display and 254,2 then moves the window and cursor to the start of the first line. While both lists offer 254,128 to move to the start of the first line. I believe I tried all the combinations.

At this stage I am becoming resigned to having to resort to 20 character limit on file names. At least it is a little better than the early DOS 8.3 limit - just when I was starting to enjoy the freedom of the longer file names!

However, you have prompted me to have another look at that data sheet, and I have thought of looking back at the AXE133 code text document and I am starting to see how to find some of the instructions, but most are pretty mysterious. Perhaps, in reality, I don’t need more than listed those in the the two documents I am referring to. I just need an instruction number, or sequence of instructions to clear display, reset to position one, and restore left to right writing After scrolling.

I am really trying to avoid doing anything difficult, but still thinking.

Thank you



Senior Member
I did find a similar data sheet, but that is for the display, and I cannot make head or tail of it

I am interfacing via the firmware chip on the AXE 234, using those 254, xxx commands. I cannot see how to relate the information on that data sheet to a three digit decimal number to put in those commands.
Yes, display controller data sheets can be quite complicated, because so are the display controller chips! Many of the commands contain Binary-Weighted "mode" flags which determine the (subsequent) behaviour of the controller. To construct the complete (byte) command you add together the "weights" (1, 2, 4, 8 etc.) of the flags that need to be set. But you don't actually need to calculate the complete decimal (three-digit) value, the editor also understands Hex ($ prefix) and Binary (% prefix) numbers, so you can just use the binary values from the table on page 22 of the Winstar data directly into the command, for example 254, %00011000 . As with decimal numbers, you can omit any "leading zeros" for compactness. The main problem is that the data sheet doesn't seem very clear about the "polarity" (on/off left/right, etc.) of some of the flags, so a little trial-and-error may be needed.

Previously, I've mainly used the 16 x 2 and 20 x 4 LCD displays and not found any need for scrolling. I don't have a 20 x 4 OLED display so I tested the AXE133Y (16 x 2) OLED display, which works mainly "as expected". Even the 16 x 2 has 128 bytes of display RAM which are accessed as a linear array (from addresses 128 to 255). However, it appears that for (side-) scrolling, the memory is arranged as two rings of 64 bytes; the two rings are synchronised (i.e both rows of characters move together), but characters never move from one row to the other (so vertical scrolling doesn't look to be possible). You can move the "cursor" (character entry address) to any address, but it seems you can only increment or decrement the display start address, or reset it to the "Home" (address 128) with command 254 , 2. With the 4-row LCDs, Rows 3 and 4 start at addresses 160 and 224, but the Winstar data sheet appears to refer only to 40 character rows, so it's not clear if rows 3 and 4 start at 148 and 212 ?

For easier testing, it's useful to display the cursor, either "blinking" with command 254 , 13 or Underline (254 , 14) or both (254 ,15). It's turned off again with 254 , 12 . If the cursor doesn't appear, then try moving its address with a 254 , <address> command (where the address is a value between 128 and 255), or "Home" the display. There are two types of scroll command, the easier to use shifts the whole display one character right of left but leaves all the characters (and the cursor) unchanged. That command is 254 , 24 to shift left and 254 , 28 to shift right. You can put either of those commands in a DO ... LOOP, with a PAUSE of some hundreds of ms to give a continuous side-scroll.

The alternative scroll method enters all subsequent characters at the cursor position and then moves the display (and the cursor) sideways by one character. So typically you would move the cursor to the right hand side of the display (with a 254 , 143 (for 16 characters / row) or 254 , 147 (for 20 characters) and then a 254 , 7 for an "automatic" left side-scroll (it's 5 for right-scrolling). To stop scrolling use a 254 , 6 (or 4) command and then perhaps a 254 , 2 (so that you know which part of the RAM is being displayed). You will need to send characters to the display quite slowly to make them readable.

Cheers, Alan.


Well-known member
Thank you so much Alan for that most comprehensive reply. You have filled in many gaps in my knowledge exactly. I have printed that out to keep with my reference material along with the data sheet.

You started me thinking in the right direction yesterday, but today was right on, and filled in many gaps, thank you.

I will see what I can put together in the way of an expanded code list, but connecting that binary information in the data sheet to the numbers makes it all clear. So a little study and experimenting and see how far I can go. It will be a few days, but I will come back and let you know how I go.

I am using the 20 x 4 line display, so I will check how more of the commands work with that. It was displaying long file names with that ppp_xxx code that tripped me up, I am finding that the command numbers for display locations correspond exactly with the codes given in the AXE134Y data sheet, so 128 for line 1, then 192, 148 and 212 for lines 2,3 and 4 in that order. So mine seems to follow the Winstar data sheet. For the moment I have gone to shorter file names.

The (254, y) commands also work as described So you can display a character where ever you require on the display.

I am having no trouble displaying and holding labels in my chosen positions, (that minimises the time required to reprint frequently) and then displaying the data in the appropriate positions as it is generated or updated. And I am now even displaying my appropriately short file name for 10 seconds as part of the “boot up” routine. All that is required to find the right file in a year or so‘s time. Ultimately, perhaps a better answer than scrolling, but I will experiment further and see what I can do.

Well, I can also announce success with the main project. The communication link and servo driver board are all working with Hippy’s code. Replacing the test servo movements with code for the algorithm I am using gave a controller that was unstable but basically working predictably with no glitches. The instability was typical of an automatic control loop with delays within the loop.

I reduced all the little fixed delays to 50 mS, to achieve a working controller up to 2000 rpm (just not tested higher) but still unstable at lower speed. Display and servo communications still seemed to be all working ok and could possibly go shorter without issues, but 30 mS is probably close to the lower limit. This was due to the unavoidable time taken by the pulsin command at slower speeds. It was easily damped out by including a variable maximum servo move limit, so the controller had to got through the loop several times to achieve a big change. This resulted in a very nicely working Proportional controller implemented with just 2 08M2+ chips a few components and a wheel with blades to interrupt a light beam using a commercial photo interupter component. And not even needing to increase the processor operating speed! In industry it would be called a digital governor, and would be found (in a more sophisticated form) on many high speed engines and turbines. The modern equivalent of the early Watts flyball governor.

A bit of hardware tidy up is all that is required to complete the project,

A huge thank you to all who have contributed.

Last edited: