This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
digispark:tutorials:debugging [2013/05/05 03:07] RC Navy [How to use this debugging capabilities?] |
digispark:tutorials:debugging [2016/06/09 12:03] (current) |
||
|---|---|---|---|
| Line 50: | Line 50: | ||
| ===== Bi-directional Serial Debugging with a single I/O ===== | ===== Bi-directional Serial Debugging with a single I/O ===== | ||
| - | If you didn't plan to use DigiUSB in your final sketch, the following proposed alternative consumes less pin than USB and less program memory.\\ Since the last version of <SoftSerial> library (may 2013), <SoftSerial> is an alternative for debugging Digispark just using a single I/O.\\ By declaring a <SoftSerial> object with the __same__ pin for Tx and Rx: it's possible to use a half duplex (request/response) software serial port using a __single__ I/O. | + | If you didn't plan to use DigiUSB in your final sketch, the following proposed alternative consumes less pin and program memory than USB.\\ Since the last version of <SoftSerial> library (may 2013), <SoftSerial> is an alternative for debugging Digispark just using a single I/O.\\ By declaring a <SoftSerial> object with the __same__ pin for Tx and Rx: it's possible to use a half duplex (request/response) software serial port using a __single__ I/O. |
| - | The external interface is composed of 2 resistors and a regular diode (See below).\\ Please, note this solution requires a native RS232 port (rare today) or a RS232/USB adapter on the development PC. | + | The external interface is composed of 2 resistors and a regular diode (See below).\\ This approach allows to use the built-in Serial Monitor of the arduino IDE.\\ Please, note this solution requires a native RS232 port (rare today) or a RS232/USB adapter on the development PC. |
| ==== How to use this debugging capabilities? ==== | ==== How to use this debugging capabilities? ==== | ||
| Line 116: | Line 116: | ||
| __Note__: | __Note__: | ||
| * Trick to be less intrusive: use a "high" data rate (38400 is fine) -> less time wasted in ISR and for transmitting each character. | * Trick to be less intrusive: use a "high" data rate (38400 is fine) -> less time wasted in ISR and for transmitting each character. | ||
| - | * you can still upload your sketch modifications through the USB interface whilst the additionnal serial port is selected as Serial port in the IDE. | + | * You can still upload your sketch modifications through the USB interface whilst the additionnal serial port is selected as Serial port in the IDE. |
| "Vintage" serial interfaces are not dead! :-) | "Vintage" serial interfaces are not dead! :-) | ||
| + | |||
| + | [[http://p.loussouarn.free.fr/partage/arduino/Libs4Digi_1io_Debug.zip|Download here the related libraries]] | ||