PropBasic ? converting INL and INC to the Prop from earlier BS2 code.
Hello All:
·I'm in the process of converting a remote controller I made with the BS2 and the 27980/27981 RF modules with a Propeller.·I used INL and INC with the BS2 to take in the button states.
·How do I due this with the Prop. and PropBasic ?
I have attached the BS2 code I wrote just to show what I did thier.It works great with the BS2.
I want to expand the capability's of my remote. and later replace the BS2s on the RX end as well.
Thanks in advance for any help!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
·I'm in the process of converting a remote controller I made with the BS2 and the 27980/27981 RF modules with a Propeller.·I used INL and INC with the BS2 to take in the button states.
·How do I due this with the Prop. and PropBasic ?
I have attached the BS2 code I wrote just to show what I did thier.It works great with the BS2.
I want to expand the capability's of my remote. and later replace the BS2s on the RX end as well.
Thanks in advance for any help!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
Comments
INL PIN 7..0 INPUT INC PIN 11..8 INPUT
The first pin number is that of the most significant bit of the value while the 2nd pin number is that of the least significant bit of the value.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
This is great and really simple too. I was way over thinking it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.·
somevar = pingroup
is okay. Likewise, you cannot write an expression to a pin group, you can only move the contents of a simple variable:
pingroup = somevar
These restrictions are fairly minor.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
·I see Your point, as I couldn't get my first code to compile w/ PropBasic. I made the changes You spoke of with swaping PINs into another VAR " SomVar1 = controls " "SomVar2 = speeds" in my DO LOOP.· This finaly compiled OK w/· no errors.
·I'll have the test bed set-up in a lillte bit with the PropProDev.Board and the BOE bot.
·I can't Thank You guys enough for the PropBasic complier and the support!!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
· I'm still trying to get this to work. And I'm sruggling. I finaly got some code to compile but its not working rite.
I have attched the code I'm useing. I'm just tring to read in pins 0-7 at this point.
Thanks in advance for any Help!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
Use underscores to make binary values easier to read.
ELSEIF buttons = %1111_1111 then '1111_1111 then
Here is how I would do it:
DEVICE P8X32A, XTAL1, PLL16X XIN 5_000_000 IsOff CON 0 IsOn CON 1 buttons PIN 7..0 INPUT LED PIN 12 LOW PROGRAM Start Start: DO IF buttons = %1111_1111 THEN 'all buttons when not pressed should = 1111_1111 LED = IsOff ELSE LED = IsOn ENDIF PAUSE 500 LOOP END
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
Post Edited (Bean) : 6/4/2010 11:12:09 AM GMT
That worked.
I would like to send the button states to the PST to help me understand the pin masks.·I have tried this a few times with no success. I think its because I'm passing a BIN# of to valueStr and it will not compile.I looked through the PropBasic PDF docs, but didn't see anything. Any links or ideas here?
Thanks in advance for any help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
Post Edited ($WMc%) : 6/4/2010 5:23:18 PM GMT