Bean...a question or two..please...
denno
Posts: 223
in Propeller 1
Reference propbasic..How many "LONG(s) are allowed in a COG...and are there more of them used in COG 0 to run or convert the propbasic to spin? I have notice an ERROR at the bottom of the download page that says I have exceeded the number of longs by 27. The program still loads, but in this particular, COG, I do get strange results..mainly, some of the SEROUT to the LCD, does not display...
Also, is there some "secret" way of using the SEROUT command, in the same manner as using the command in the Basic Stamp. Meaning with a comma delimiter between each instruction, instead of using the SEROUT command with only one instruction at a time...? Hope I am making since..thanks...DennO
Also, is there some "secret" way of using the SEROUT command, in the same manner as using the command in the Basic Stamp. Meaning with a comma delimiter between each instruction, instead of using the SEROUT command with only one instruction at a time...? Hope I am making since..thanks...DennO
Comments
PropBasic is NOT converted to spin. It is converted directly to assembly language on the PC.
You need to put SEROUT in a subroutine to save code space.
Bean
So, when I "build" my program and at the bottom it says "Program size is 3380 LONGS" Is that everything all together. I notice if I should exceed a certain amount of the Program size, some where around 3470 LONGS, I will still get a successful download, to RAM and even EEPROM, but the last part of the program will not work...the part before I ran out of room. I am guessing. Is that right?
BTW, there is infact 199 lines of code in the complete program...as stated below...so the complier did see the whole program, but just did not compile the whole program?
And, thanks for all your time and effort in building PROPBASIC...as some of us are just "basic" people...DennO
Mike R...
As a footnote, I like to set alot of things to CONSTANTS, and use descriptive words to describe various variables...makes for easier reading of the code...I just purchased a FLIP, and have an embedded project for that. Presently, using the PROP Activity board that was sent to me for free, many years ago, when the PROP first came out...even with the Manual..1.0.
Readers, please don't take this the wrong way, but I don't like using other peoples "OBJECT(s)" in SPIN, as I find alot of them very hard to read, especially, in assembly language. That is why I always liked PBASIC for the stamp, and now, propbasic for the prop..
pmrobert, one last question...is the STACK directive necessary in propbasic (LMM mode?)
The next thing I need to figure out is how to set up a SUB ROUTINE for the SEROUT out commands to save code space.
thank you again...DennO
InitStr DATA clrLCD, beep, backLTon, posCMD, 64, "TEMPERATURE IS", posCMD, 84, "TEMPERATURE IS", posCMD, 104, "VOLTAGE=", posCMD, 119, "volts", 0
SEROUT LCD_data_out, baud, InitStr
Something like that...
Bean
And, using propbasic, what are the total number of LONG(s) available to use in programming. Right now, I am at 6720 LONGS in this little test program in my previous post/thread..
Edit: Oops! I see I'm wrong. The arguments to the PropBasic RDLONG are backwards from the PASM instruction. Sorry!
SEROUT LCD_data_out, baud, LCD_data
Bean
The LCD may need a delay after some commands like clrLCD and Beep. I don't know...
If you want to send a character at a time you'll have to do something like:
Bean
However when I try to load the following line as data, the "STRINGS" will not display...as example..the "temp_1DEC", "temp_2DEC", "actualVOLT", actualVOLTtenth, and actualVOLThunds....and so on... The "degreeSYM" and the "." do place in the proper place on the display...I have tried many different things, but no joy as of yet...
So, any thoughts on how to pass a DATA string which is just numbers...the following is the code that runs in a DO?LOOP. The variables in the loop get refreshed each iteneration through the loop. But they will not display on the LCD. The loop runs as coded, and the variables will display properly, however, I am wondering if there is a way, using less SEROUT's. I hope I am making sense. Readers please keep in mind that this is just a snippit of the program. Basicly, I am just teaching myself PROPBASIC, and trying to run all eight COGS in one program...
Thanks...and this is fun....DennO