New to Propeller programing
djt
Posts: 19
I am a propeller programing neophyte, therefore please accept my questions in that light. I am attempting to run Full Duplex Serial Plus V1.3·obtained from Object Exchange, and display the results on Parallax Serial Terminal. The program complies and·I can open a Parallax Serial screen. No data is presented.
I have run the Education Kit programs on my board and returned results from the Parallax Serial screen. So, the board setup appears to be OK.
I have entered specific data (31,30,0,57600) for the rxpin,txpin, mode, and baudrate with no success. Get an error message -- expected unique parameter name.
Had similar problems with Sensirion Demo(also from Object Exchange). Tried substituting Parallax Serial Terminal and Mirror.spin for the TV object. No data returned on the Parallax Serial Terminal screen.
What am I missing and where have I gone wrong ?
Thank's,· DJT·····
I have run the Education Kit programs on my board and returned results from the Parallax Serial screen. So, the board setup appears to be OK.
I have entered specific data (31,30,0,57600) for the rxpin,txpin, mode, and baudrate with no success. Get an error message -- expected unique parameter name.
Had similar problems with Sensirion Demo(also from Object Exchange). Tried substituting Parallax Serial Terminal and Mirror.spin for the TV object. No data returned on the Parallax Serial Terminal screen.
What am I missing and where have I gone wrong ?
Thank's,· DJT·····
Comments
Use the Attachment Manager (click on "Post Reply" to get it) to attach an archive of your program to a reply. The Propeller Tool will make an archive for you ... See the "Archive Project" menu item in the Files menu.
welcome to the forum !
The forum-members (and especially me) likes to have the COMPLETE SPIN-code.
Complete means YOUR code from the very first to the very last line AND ALL object-files.
As Mike has described above there is a quick way to do that. You simply archive the files to a ZIP-file
from INSIDE the propellertool and attach this zipfile to a posting.
Then anyone who wants CAN download the attachment and CAN
have a close look at the code. As ONLY then everything is included the others can compile your code.
If objects are missing they can't compile it (or have to search around for the missing objects)
See the attched picture how to save ALL files to a zip-archive. It's even less work than all other ways
like copy&paste or whatever.
best regards
Stefan
The nice thing about the Prop is that when things don't work... it is usually your fault[noparse]:)[/noparse]
the code you posted does compile with no error-message. So where is the problem ?
458 lines of code is 440 lines too much for posting it directly into a message
If you want the forum to READ your postings keep the text short
(range 10-30 lines of 80 columms)
please click on the small picture below
best regards
Stefan
to the Forum. I haven't learned how to get the file from Propeller Tools without copying and pasting. I'll work on it.
Thank's for your comments and I'll be back after·I've had a chance to look at it again.·
Once you have successfully compiled the program, as you did and as I did, what prevents me from obtaining data from the Parallax Serial Terminal screen, because no data shows up. Are you saying·the program is running properly and somehow I have to input·additional data into the program to have it show up on the screen?
Thank's for your input.·djt
OK now I can see what is going on
Yes you are right need additional things.
But NOT inside the file FullDuplexSerialPlus.spin
You should leave this file as it is
If you just loaded the file FullDuplexSerialPlus.spin
compiled this file to RAM or to EEPROM it is normal that nothing happens
FullDuplexSerialPlus.spin ist just some kind of a "driver" that provides functionality
you have to use in an OTHER *.spin-file
You have to use the file FullDuplexSerialPlus.spin as an "object" which is used
by a file that you write on your own.
The file FullDuplexSerialPlus.spin should ONLY contain its predefined code and NOTHING ELSE
I attach a demo-program to my posting that shows you how to use this file
best regards
Stefan
djt
When compiling the program I get an error message--subroutine expected at the float to format line.
Thank's·· djt
I'm a newbie too. So here goes, a crash course trying to condense 200 pages of the propeller manual into a few paragraphs.
subroutine expected is because it is missing. At the top of the program is
You need all 4 spin files in whatever directory you are working from.
What is "fp"? Well, further down the program, all the above spin programs are renamed:
Then you use them with lines of code like this
fp.FloatToFormat(fahrenheit(tempC))
Why name it then rename it? Well, if you have an object that prints to a TV screen, and you want to change all output in the entire program to now output to a VGA screen, you can drop in a new object (eg a VGA driver instead of a TV driver) and rename it just once in the OBJ section.
Objects sometimes come packaged with a demo program, but they may not. Eg the fullduplexserial object earlier may not have a demo. StefanL38 has posted a nice demo as a single package.
I don't know if you have programmed other languages like Basic or C, but objects are like keywords in those languages. eg PRINT in Basic or PRINTF() in C. The serial object is like the code behind the PRINT statement. It doesn't do anything until you use it, eg PRINT "Hello World". In Spin this might be
OBJ
PRINT : "fullduplexserial"
and further down in the code
PRINT.tx("Hello World") ' where tx is pre-defined in the fullduplexserial object (which we renamed PRINT in the OBJ section.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/build
should I name FloatToFormat as a method in SensirionDemo, if so what should·it do?
I have not modified the SensirionDemo file,· or the required spin files, so it should include everything needed to compile and run.··I don't recognize what I have missed.
Thank's again for your help. Your additional comments would be appreciated······ djt···
I think I found the bug
@parallax pay attention
the setup-file of the propellertool contains a real old version of floatstring.spin
the header inside this file is this
now the actual version of floatstring.spin contains THIS header
the sensirion-demo uses the v1.1 or v1.2 with the added FloatToFormat-method which is missing in the floatstring.spin which is stored
in the subdir C:\Program Files\Parallax Inc\Propeller Tool v1.2.6
so download the newest version of the FloatString-object
it's bad that this NEW object uploaded by Michael Park has the EXACT same name as the old object
if you do a search in the obex for floatstring you can see
the different versions containing different methods with the exact same name
best regards
Stefan
Post Edited (StefanL38) : 11/12/2009 7:23:22 PM GMT
For future reference, what should I have done?
RoboGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BS2: $49
SX48 Protoboard: $10
Propeller Protoboard: Priceless
www.apple.com
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.jameco.com
djt
Temp and RH would be easy with the SHT11.
RoboGeek
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BS2: $49
SX48 Protoboard: $10
Propeller Protoboard: Priceless
www.apple.com
www.parallax.com
www.goldmine-elec.com
www.expresspcb.com
www.jameco.com