Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:29 11 May 2025 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 : MM serial commands

Author Message
Dr. Diode

Newbie

Joined: 28/06/2014
Location: United States
Posts: 4
Posted: 01:29pm 28 Jun 2014
Copy link to clipboard 
Print this post

I'm a newbie to this forum so I apologize in advance if this topic has been covered before.

I've been using the PICAXE uC for a number of years and currently I'm playing with the MicroMite uC. It is an elegant device; kudos to Geoff et al.

My setup is a MM connected serially to a LCD display (with its serial daughterboard).

There are a set of commands that are used to control the LCD display. For example, in order to turn on the backlight, command value 17 is sent to the display whereas value 18 is sent to turn the backlight off.

In the PICAXE world it is:

SEROUT PIN, BAUDMODE, (17) 'backlight on
SEROUT PIN, BAUDMODE, (18) 'backlight off

How does one do this using the MicroMite uC?

Thank you for a reply.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 02:56pm 28 Jun 2014
Copy link to clipboard 
Print this post


OPEN "COM1:9600" AS #5 ' open the first serial port with a speed of 9600 baud
PRINT #5, chr$(17); ' send the ascii character for 17 without any CR/LF
'
CLOSE #5 ' close the serial port


Change the baudrate to suit.

Jim
VK7JH
MMedit
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 12:24am 29 Jun 2014
Copy link to clipboard 
Print this post

Michael,

The MMBasic commands direct to LCD displays are for using with the standard parallel controllers, e.g. KS0066, HD44780 or SPLC780, not serial controllers. You can recognise LCD modules that use these by their connectors which usually have 16 pins.

I think the 'serial' modules you are talking about are I2C protocol serial modules. MMBasic does not have direct single commands for I2C protocol LCD modules but it does have commands to talk to I2C devices but their use requires a lot more programming effort.

If you haven't done so already, download a copy of the MMBasic Manual from Geoff Graham's website MicroMite . You'll find a download link for it at the bottom of the page. Go to page 19 and have a read.

There is an MMBasic library of programs for the Maximite and a download link to it is under "Other Downloads" at the bottom of the page of this link. Library There are I2C protocol programs for LCD's available there that should get you underway. Note that those programs are written using the "old" MMBasic I2C commands and they have different names to the current ones so you'll need to change them. For info about this read Appendix B of the MMBasic Manual - especially the box at the bottom of page 60.

Another option is to replace your I2C modules with standard parrallel modules and then you can use the simple direct one line MMBasic commands. The good news is they're a lot cheaper, the bad news is they take up more pins on the MicroMite.

Greg
 
Dr. Diode

Newbie

Joined: 28/06/2014
Location: United States
Posts: 4
Posted: 11:37am 29 Jun 2014
Copy link to clipboard 
Print this post

Gentlemen,

Thank you for the prompt reply.

The display device I am using is RS-232 type; Parallax model 27977.

TassyJim's reply did the trick!

Again, thank you for the support.

Best.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025