![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
I've written code to send text from the Firefly to my PC using the AUSART. First odd thing I noticed was that it worked fine when run slow in the debugger, but sent nothing when run at full speed. I finally found that if I put a short delay right after setting SPBRG during the init, it works normally. I've never had to do this before. Is it something specific to the Firefly or the 16F88, or have I just been lucky up to now with 16F's?
__________________ ========================= Futz's Microcontrollers & Robotics ========================= Last edited by futz; 22nd February 2008 at 08:50 AM. | |
| |
| | #2 |
|
Are you using the INTOSC? If so, this is a symptom I've seen on several different PIC devices including the 16F88. On my 16F88 boot-loader I actually include an additional delay after testing the oscillator stable flag before using the UART. Mike | |
| |
| | #3 | |
| Quote:
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | ||
| |
| | #4 |
|
Yup, that cured it. No delay needed. Just a quicky little oscillator-stable loop, waiting for the IOFS bit to get set. Code: init banksel OSCCON ;bank 1 movlw b'01110110' ;internal 8mhz osc movwf OSCCON stable btfss OSCCON,IOFS ;oscillator stable? goto stable ;no, wait . . .
__________________ ========================= Futz's Microcontrollers & Robotics ========================= | |
| |
| | #5 |
|
I wonder if that applies to all PICs with an IOFS bit. Good thing to know. Nice photos too futz | |
| |
| | #6 | |
| Quote:
Costco just recently had them on sale for $100 off, so I grabbed one. All previous pics came from my Canon A80.
__________________ ========================= Futz's Microcontrollers & Robotics ========================= Last edited by futz; 23rd February 2008 at 04:43 AM. | ||
| |
| | #7 | |
| Quote:
Mike | ||
| |
|
| Tags |
| 16f88, firefly, problem, rs232 |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| JDM programmer problem | krvavizmaj | Micro Controllers | 17 | 6th August 2009 01:24 AM |
| USB to RS232 Converter | VictorPS | General Electronics Chat | 7 | 16th June 2007 04:59 AM |
| Strange problem | tkvenki | Micro Controllers | 1 | 3rd May 2007 12:40 PM |
| I²C and RS232 on the same PIC | l30 | Micro Controllers | 2 | 3rd July 2004 04:14 AM |
| Creative live 5.1 problem... | nassus | General Electronics Chat | 9 | 10th June 2004 06:51 AM |