PWM Conversion to "________" <---- Insert data

It has been a long long time for me since I had to look at a hardware description language. Probably back in the ice age at school. I think the language they used back then was AHPL, which was based on APL…

Thanks Eddie for the overview as you said you could probably make a cost effective way of offloading the work from the BAP. I am not sure that it would make it easier for non-hardware programmers to understand.
It would possibly have the added advantage of maybe using fewer of the BAPs IO pins.

quite right of course in it not being much of an at home type solution… really would need to be sold as a breakout PCB with programmed part installed.

ya know I wonder if there is an option there… one of those generic breakout footprint patterns like on a vectorboard or surfboard but on a SSC-32 / BB2 stackable footprint. Could run some through BatchPCB and find something similar for sale on sparkfun a couple months later. :stuck_out_tongue: :laughing: Sry, my bad. :smiling_imp: :smiley:

well 3-5 bucks aint bad!

Although I think programming one of these with the knowledge I have is probably going to be pretty challenging!

Although I’m kinda leaning more towards code :stuck_out_tongue:

how do you run code off the BB2 with the serial port linked to it to view live values off variables to debug??

Put this in your program.

serout s_out,i57600,[dec my_variable,13]

This will send whatever is in that variable to the DB9 so you can open a terminal window to see the results. Make sure the baud rate in the terminal connect is set the same.

Thanks Jim,

Is this feature in the atom pro software under debug?
I thought I saw something in the atom pro software that was for debugging… this the same kinda thing?

Or was the only way to do this was to use the Lynxterm software as you mentioned.

… Kinda tempted to get a small lcd for debug and mount it…somewhere…

–Aaron

There is also a debug mode, that you can compile the program in a special mode by clicking the Debug button. There are some special commands that only work in debug mode (debug, debugin). In this mode you can step through your program set breakpoints, view variables and the like. This works great some of the time. However if your program is a little more advanced and includes things like assembly language or interrupts or timing loops, etc, the debug mode causes the program to run different enough that you may not be able to debug your actual issue. That is where the serout S_OUT is very nice. I use this a lot. Likewise I quite often have serial LCDS connected to my bot and I use serouts to its IO port as well to output variable contents and the like.

Other times I use the LEDS on the BB2 to help me debug. If you are not sure if your code gets to a certain point, you can set it up to turn on one of the LEDS if the code gets there. On one program I ended up blinking a couple of the LEDS with the value (one led for 10s one for ones…).

So there are lots of ways debug.

Kurt

Hey thanks kurte,

I was going to try and write my own plusin command for this pwm conversion to I can understand the math and convert the pwm signal into usable numbers I tend to think the code I write is pretty simple … alt least when I did VB…

It’s also pretty tempting to order that logic analyzer you have from the website thing looks pretty legit and easy to use might consider buying that, I can see how you would use that to determine which inputs to read in what order on your receiver! quite handy

I find it quite tempting to order another bb2 and Atom pro just for experimenting rather then keep reloading the code on my Phoenix…

I might have to look into one of these serial lcds I wish there was a way to run the code by emulating the atom processor but do it over the serial cable and still able to use its input/output pins and all… “OH WELL”

I like your interesting ways of debugging code I assumed the led’s were not usable with the phoenix code because of those jumpers… I think I’m going to display which gate your currently on in binary with the A B C led’s that would help me quite a bit “on xan’s ps2 code 1.3”

anyway GOOD ideas!

I keep ranting on and on about this silly pwm thing been talking about it 2 weeks and I still have not got my 50 150mm futaba ends I baught off ebay for 1.99 from china! ERRR should have bought 500 if I knew it was going to take this long hahaha SIGH…

Thank’s again kurte

  1. I never use debug for the reasons Kurt mentioned. Using the built in terminal works better for me.

  2. I never mentioned LynxTerm. The programming IDE has built in terminals that are at the bottom of the screen.

  3. Yes a serial LCD is another good way for getting info out of your running program.

You know you could have got these a lot faster and cheaper. :wink:

lynxmotion.com/Product.aspx? … egoryID=44
lynxmotion.com/Product.aspx? … egoryID=44
lynxmotion.com/Product.aspx? … egoryID=44
lynxmotion.com/Product.aspx? … egoryID=44

You are welcome.

Yes the logic analyzer helps out. For $150 mine works great. It does have it’s limitiations. For example it does not give me a live view. I say capture now and it captures the data and displays the results. It does have trigger settings so this is not all bad. Also it only has 8 inputs, which again for me gets me 99% there.

The LEDs work well for simple logic testing. You can still use them with the PS2 connected, by first removing the PS2 jumpers (you probably should have anyway to make it more likely that the PS2 worked. You then use a 3 pin (or 1 or 2…) jumper cable and jumper lets say the IO pins 4-6 to the LED sides of where the ps2 jumpers were. Then you can now use IO pins 4-6 to use the LEDS and buttons…

As for jumper wires I think each 2 or 3 pin jumper wire is less than $2 from Lynxmotion and you can also buy a kit that allows you to crimp your own for $23 as well. And yes it is very handly to have a spare board and processor to experiment on without having to tear appart your bot…

Good Luck
Kurt

Jim, Kurte,

I bought 50x 150mm servo ends for 1.99 :stuck_out_tongue: so no not cheaper…

As for your logic analyzer Live view would be very handy atleast for monitoring pulse widths without scrolling endlessly… “maybe they will fix that in the future”

as for crimping I was just going to solder the ends together and heat shrink them all, I wont be doing 50 of them but around 8 - 16 of them so no big deal.

I’ll fiddle around with using those led’s I have a good idea how to jump the connections it seems pretty straight forward.

–Aaron

if you are actually saying you bought (50) count of 6" long servo ends for a total of $2… good luck with that and I hope they don’t fall apart in your hands or melt apart when you stall a servo and have to supply more than a few hundred mA. :frowning:

Hey direct from china :stuck_out_tongue: why not Its not like they are made out of 50 gauge wire and thinner then a human hair, and yes 50 count… i could have spent 12 bucks and got 500 of them :stuck_out_tongue:

plus everything’s made in china anyway

Just twiddling my silly thumbs waiting for them to arrive in the mail! this is horrible.