![]() |
Forum Index : Microcontroller and PC projects : MM serial commands
Author | Message | ||||
Dr. Diode![]() Newbie ![]() Joined: 28/06/2014 Location: United StatesPosts: 4 |
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: AustraliaPosts: 6220 |
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: AustraliaPosts: 1329 |
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 StatesPosts: 4 |
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. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |