Bug with PropBasic ?
$WMc%
Posts: 1,884
Hello all
·I not sure if its a bug or I'm doing something wrong.
When I send out a VAR like this·%0000_0001 I'll get this·%0000_0001 back?, If I send %1000_0000 then·I'll get this·%0001_0000 back.
This is messing up all of my shift reg. code and my SEROUT/IN code.
In the test the LSBs come in order %0000_3210. But the MSBs are reversed %4567_3210 with the buttons pressed in order from pin7..pin0.
Yes the LED pins are in order from pin15..pin8 ???
·I have attached a sample code using LEDs and buttons to show this in more detail.
Any help with this would be great!!!
Thanks in advance
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
want speed?·want·to use the Propeller?·want to stay with BASIC___www.propbasic.com___
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
·I not sure if its a bug or I'm doing something wrong.
When I send out a VAR like this·%0000_0001 I'll get this·%0000_0001 back?, If I send %1000_0000 then·I'll get this·%0001_0000 back.
This is messing up all of my shift reg. code and my SEROUT/IN code.
In the test the LSBs come in order %0000_3210. But the MSBs are reversed %4567_3210 with the buttons pressed in order from pin7..pin0.
Yes the LED pins are in order from pin15..pin8 ???
·I have attached a sample code using LEDs and buttons to show this in more detail.
Any help with this would be great!!!
Thanks in advance
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
want speed?·want·to use the Propeller?·want to stay with BASIC___www.propbasic.com___
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
Comments
That said, I simplified it like this:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
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]
Well; ·Now I'm really confused. I don't see why the first 4 bits on the right are in order and the second 4 bits on the left are reversed?
·I have included a hardware drawing of what I have set-up on the Propeller Pro. Dev. Board and a little chart to show the LED that gets lite from what button is pressed in the code I posted earlier.
·If You can find the time to look at My little drawing posted below,I would really appreciate it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
want speed?·want·to use the Propeller?·want to stay with BASIC___www.propbasic.com___
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
I've looked at the generated code, and I don't see anything wrong.
Like Jon suggested, triple check your wiring.
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]
I was just curious, what the compilation result is.
(I do think too, it should be a wiring issue here.)
But I have seen, that every LED line is switched to LOW for the time of one instruction.
················· mov·········· __temp1,ina················· '· LEDs = buttons
················· and·········· __temp1,buttons············
················· shl·········· __temp1,#8·················
················· and·········· __temp1,LEDs···············
················· andn········· outa,LEDs·················· <<<<<<< switch to low!!!
················· or··········· outa,__temp1
I think, this is a trap, because it can generate very short additional pulses.
Christof
Yeah, I know, it's just that it takes two more instructions to do it glitch-free.
I guess I should change it though....
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]
After reading Your post replies, I started investigating My wiring further.My wiring was good. I had some other devices on the board and some of them were wired to the I/O pin groups in the VGA pin group of the PropProDevBoard. None of these pins where shared (only 1 jumper wire per pin) But I seem to remember mixing resistors for the VGA output.
I know now this is a hardware issue and not a PropBasic software issue.
I now have a working code that does what I expect it to do.(with the other hardware devices removed)
Many Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
want speed?·want·to use the Propeller?·want to stay with BASIC___www.propbasic.com___
You can feel stupid by asking a stupid question or You can be really·stupid by not asking at all.
Post Edited ($WMc%) : 6/25/2010 11:13:05 PM GMT