Need help trying to get one program to use another to print to LCD????
mikediv
Posts: 825
Hi guys I have 2 programs one is Andy Lindsay prop (((PstDisplayResistance.spin)) the other is LCD code I found in the Obex downloads. By themselves they both work just fine but I am trying to modify (((PstDisplayResistance.spin)) to print to an LCD instead of the PST ..
I first tried by making the LCD an Object and tried calling it from inside,(((PstDisplayResistance.spin)) no luck , I then tried tying them together no luck can anyone take a look at what I have and guide me please as usual thank you all for any help.
I had to attach them as files becuase when I tried to do a cut and paste it looked awful. I could also use some advice on how to post code from cut and paste that would look decent?
I first tried by making the LCD an Object and tried calling it from inside,(((PstDisplayResistance.spin)) no luck , I then tried tying them together no luck can anyone take a look at what I have and guide me please as usual thank you all for any help.
I had to attach them as files becuase when I tried to do a cut and paste it looked awful. I could also use some advice on how to post code from cut and paste that would look decent?
Comments
I'll let the usual guru's help with the slicing....since I have to ask a bunch myself.....
The code must be put between
This is the only way to preserve the spacing.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Post Edited (James Long) : 10/23/2009 3:38:21 PM GMT
your LCD has a serial interface for controlling it.
Somehow the serial bitbanging towards the LCD has to be done.
This is done by a serial driver who cares about the details of the bitbanging
so you don't have to care about them.
In this case this is done by the oject "FullDuplexSerialPlus" short FDX+
LCD.SPIN uses FDX+
and PstDisplayResistance.spin uses FDX+
LCD.SPIN was made to communicate with an LCD which works at 9600 baud which is connected to PIN 15
and the code LCD.SPIN starts the serial driver FDX+ with the parameters mentioned above
PstDisplayResistance.spin was coded to communicate with the PST.EXE over the Propplug (which use PIN 31,30 at 57600 baud
the serial driver is your butler you call for "serving serial data" whatever the serial dat might be
Now I assume you want the LCD to show a resistance-value
therefore you DON'T need the PstRcDisplay.spin-file
You need the object that measures the resistance which is "RcResistance.spin"
and a PART of the code-LINES of PstDisplayResistance.spin
the pub Update does the details to clear display show a title "R =" and show the value
in PstDisplayResistance.spin the serialdriver-object FDX+ has the name "debug"
if you put this code into your LCD.spin you have to rename the codelines that
they match with the name of the FDX+-object in your file LCD.spin which is
so to add the Pub update to LCD.SPIN it looks like this
but as R is delivered as Floating-point-value you have to use FloatToString
and add the floatstring-object to your code
and somewhere you have to add the measuring of the resistance itself
The code above are only code-snippets to show the principle it is not enough to copy & paste them together
try it and if it does not work come back with any questions you like
best regards
Stefan
Post Edited (StefanL38) : 10/23/2009 7:03:37 AM GMT
I am trying my best to digest this and will certainly have a question or two if you do not mind going forward just one for now I am not familiar with FDX+ can you give me the meaning? Does FDX+ refer to the fullduplexplus driver?
I am sorry I re-read your document and found it
Thank you
Oh James did you have a code formater ? for was it clusso?
Post Edited (mikediv) : 10/23/2009 10:57:34 PM GMT
Nope wasn't me....I'm not that deep into programming......must have been Clusso.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
Yes I realy enjoy helping. (not much postings today I'm a little bored)
here is the code formatter it is from PhiPi.
Yes FDX+ is the short name for the F)ull-D)uplex-S)erial-Plus-driver (File FullDuplexSerialPlus.SPIN)
stored in folder C:\Program Files\Parallax Inc\Propeller Tool v1.2.6\Examples\PE Kit\6 - Objects Lab\FullDuplexSerialPlus.spin
best regards
Stefan