jm_rgbx_pixel_demo.spin2 with flexspin
David Betz
Posts: 14,516
To get ready for @JonnyMac's Christmas lighting project for the P2 I've been trying to get his RGB pixel demo program working with flexspin since I prefer to do my work on the Mac if possible. I was able to compile it easily enough with the simple command:
Edit: I made one change to Jon's code. I changed STRIP_LEN to 8 to match the length of my AdaFruit LED strip.
fastspin -2 jm_rgbx_pixel_demo.spin2This produced jm_rgbx_pixel_demo.binary with I loaded onto my P2 Edge + Breadboard after having connected an RGB LED strip to P24. Unfortunately, nothing happened. No LEDs lit. I tried the same code with Propeller Tool 2.4.1 and it worked fine. I will use this thread to describe my attempts to find out what went wrong with the fastspin build.
Edit: I made one change to Jon's code. I changed STRIP_LEN to 8 to match the length of my AdaFruit LED strip.
Comments
This has nothing to do with compiler issues; I just don't want you trying to power a larger strip from the small 3.3v supply on the P2 Edge.
Andy
This doesn't work: but this does work: The program doesn't print anything to the console. Why should I have to enter console mode for it to work?
I have Full Optimization enabled.
opening and closing ports reset the Propeller, USB enumeration reset the Propeller (just plug your camera in), and on some boards even putting out serial with nothing connected to USB will reset the Propeller because the USB chip gets powered up by parasitic power on TX and - resets the Propeller.
it is a mess,
Mike
Mike
When you're writing the program I presume?
Also: I notice you're using "fastspin" in your command lines. The Spin compiler is called "flexspin" now. Have you aliased "fastspin" to "flexspin", or are you accidentally running an old version of the tool?
On the P2 eval board Rev C, switch 1 disables the DTR reset, which would be handy.
On the P2 edge board, switch 1 turns on the onboard leds, I don't think there is a similar DTR disable
I have showed a possible code here
RTS is normally not affected on open and closing a port, and you don't need the transistor circuit to invert the signal. Also some cheap USB to serial ICs only have a RTS output.
Andy