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 : Serial GUI
Author | Message | ||||
crackerjack Senior Member Joined: 11/07/2011 Location: AustraliaPosts: 164 |
Hi all, some weeks ago there was a post which mentioned ModCom software to allow for putting a GUI facade onto the Maximite (of course running on a PC) via serial. I mentioned in that post (which incidentally, became quiet a nasty series of posts if anyone recalls), that StampPlot would possibly enable a similar GUI face - at the time I had no Maximite, so was really just taking a punt. Now my MM is running, I was able to download StampPlot and after a few minutes of setup and sniffing the output of the maximites via serial using Portmon - presto! StampPlot Pro is plotting the output from my delightful little MM very nicely indeed. See attached screenshot. StampPlot allows for macro's and all sorts of possibilities exist. It's free for hobby use and US$25 for professional use. I am not affiliated in any way. |
||||
Ray B Senior Member Joined: 16/02/2007 Location: AustraliaPosts: 219 |
I started the debacle with my post on 7th August when I introduced ModCom which I had running with a PicAxe - sure identified some sensitivities in the group but that's fine, I love blood sports especially when it's not my blood..... Crackerjack you mentioned in post # 1 "Now my MM is running, I was able to download StampPlot and after a few minutes of setup and sniffing the output of the maximites via serial using Portmon - presto!" I'm puzzled - what serial data are you reading out of the MM? Have you got some sample code. Have you got illusive dream of serial comms working ? Thanks RayB from Perth WA |
||||
jebz Regular Member Joined: 13/06/2011 Location: AustraliaPosts: 79 |
You can use the USB virtual serial port for communications. Any text output flows to this port even when you're on the VGA / PS2 keyboard connection. |
||||
crackerjack Senior Member Joined: 11/07/2011 Location: AustraliaPosts: 164 |
Hi Ray - maybe the serial comms I'm talking of is really not what everybody else is after - I'm not doing rs-232 over MM pins as such, and I think that's what I understand as the "elusive" serial comms; Or am I wrong? What I am using is serial over the USB and its really very simple. Using PRINT and INPUT$ statements from the MM and then using 9600 8 N 1 over a COM port to the PC. So instead of just using PuTTY, I'm using other software on the PC to communicate with the Maximite. A couple of examples :- Using the following gawk script I set the date/time on the maximite. You don't need to be a gawk geek to understand it, I'm sure: [code] BEGIN { print "systime$ = " strftime("\"%H:%M:%S\"", systime()) > "com4:"; print "sysdate$ = " strftime("\"%d/%m/%Y\"", systime()) > "com4:"; print "time$ = systime$" > "com4:"; print "date$ = sysdate$" > "com4:"; print "clear: cls : ? date$, time$" > "com4:"; close("com4:") } [/code] Where my maximite is on COM port4. This results in something like the following code being run on the Maximite (which is what I use in the absence of a hardware RTC on startup of my MM): [code] systime$ = "23:33:08" sysdate$ = "28/08/2011" time$ = systime$ date$ = sysdate$ clear: cls : ? date$, time$ } [/code] Loading programs via serial is really simple using similar methods and I hope to adapt my number-free BASIC script to do this soon - it will sure beat typing up long, numbered BASIC code directly (although there is some appeal in that too). A very simple StampPlot example follows: [code] 10 pi = 3.14159265 20 d2r = pi / 180 30 FOR x = -360 TO 360 40 PAUSE 50 ' Don't overload StampPlot's buffer 50 ? SIN(x * d2r) 60 NEXT [/code] This results in the following plotted graph: Using a StampPlot "macro", it is very easy to read values from the PC to the Maximite too. StampPlot has as many features as ModCom (and then some), for example meters, dialog boxes, alarms, and many others. Give it a try... As for native Serial on the Maximite, I'm not sure this is actually it? Cheers, Lance. |
||||
haiqu Senior Member Joined: 30/07/2011 Location: AustraliaPosts: 152 |
Native serial has been done. Check with the Search facility... ...although not currently supported in MMBasic. Rob unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep |
||||
Ray B Senior Member Joined: 16/02/2007 Location: AustraliaPosts: 219 |
Crackerjack said "What I am using is serial over the USB and its really very simple. Using PRINT and INPUT$ statements from the MM and then using 9600 8 N 1 over a COM port to the PC." THAT WORKS ..... and for others to understand, after connecting a terminal program (AccessPort) set to 9600N81 with Send & Receive open and loading in the sample program as below: 10 pi = 3.14159265 20 d2r = pi / 180 30 FOR x = -360 TO 360 40 PAUSE 50 ' Don't overload StampPlot's buffer 50 ? SIN(x * d2r) 60 NEXT Typed RUN then the program spits out ascii strings the USB Port as the nominated serial port. This is GOOD at least it proves MM in it's current development can send serial beit fixed at 9600 bps. Any Ideas on how to display incoming serial data ??? Ideally want to be able to receive a serial string, MM code then does something like display it's value to the VGA. This would be the basis of a simple polling system. Any comments & further advice ?? RayB from Perth WA |
||||
Print this page |