PDA

View Full Version : Configure Debug @ runtime?



dhouston
- 17th October 2011, 18:43
Is it possible to configure Debug at runtime.

I'm planning to use two 12F1840s and two 16F1283s for DIO/ADC with all reporting their data over the I2C bus in the same manner as I'm doing for serial ports. You can see it here (http://davehouston.org/I2C_SPI.htm).

There are 4 stereo jacks and those 8 lines are intended for streaming DIO (e.g. RF/IR In/Out). I would like to allow users to configure them for other uses - one of which would be as software UARTs (there are no MAX3232s). Is there any way to configure Debug at runtime. It has a lower code burden and I would like to use it, if there's a way to set baudrate.

Charles Linquis
- 18th October 2011, 01:31
I think the delay is computed at compile time, and it would probably not be too easy to modify. However, you could simply 'lift' one of the many ASM bit-bang RS-232 routines that exist all over the net and just 'drop it in' with ASM...ENDASM. The routines are generally smaller than 256 bytes, so they should not break PBP's limit. You can define the local (to the ASM routine) vars normally, but the ones that you transfer to/from PBP should be declared as BANKA SYSTEM.

dhouston
- 18th October 2011, 01:55
I think the delay is computed at compile time, and it would probably not be too easy to modify. However, you could simply 'lift' one of the many ASM bit-bang RS-232 routines that exist all over the net and just 'drop it in' with ASM...ENDASM. The routines are generally smaller than 256 bytes, so they should not break PBP's limit. You can define the local (to the ASM routine) vars normally, but the ones that you transfer to/from PBP should be declared as BANKA SYSTEM.

Thanks, Charles. I'm trying to use some dialect of Basic for everything in the project. Since the PICs all use bootloaders, I may just create multiple firmwares that support different (slower) baudrates if I cannot find another solution. Most Home Automation devices use 2400-19200 so I may just leave higher rates for those who want to roll their own.

Charles Linquis
- 18th October 2011, 02:57
I'll buy some of your stuff. Where?

dhouston
- 18th October 2011, 04:15
I'll buy some of your stuff. Where?

I'm expecting to have prototype PCBs in about 2-3 weeks. Once debugged yourduino.com (http://yourduino.com) (and possibly a couple others) will distribute them.

dhouston
- 11th November 2011, 21:04
I still have to delve into the ds30 bootloader documentation but, from a post to their forum, it appears it can be configured to invert the data so there's no need for DEBUG/DEBUGIN after all.