Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About subkor

  • Rank
  1. Damnit! I accidentally refreshed the page and lost everything I just typed! Sorry but I'm only trialing the software so I'm not going to type out all the proper headings again! If you look in serial_driver.h dated 15 Nov 2004 (from BoostC 1.8 I think) you will find the following problems (some code removed for clarity): Note, this is relevant to the PIC16F628. void PUTC(char tx_char) { volatile bit l_txif@T_TXIF_PIR.u_TXIF; // 0xf9e.4; while (!l_txif); // wait until tx register is empty l_txreg = tx_char; } l_txif will only be set when the l_txreg line is completed, therefore it will wait forever. It should be something like: volatile bit l_trmt@0x98.1; //txsta while (!l_trmt); l_txreg = tx_char; Which will wait for any current transmissions to finish. If you look at: void UART_INIT(unsigned char BRG_mode, unsigned char BRG_divisor) { volatile unsigned char l_rcsta@T_RCSTA; volatile bit l_brgh@T_TXSTA.u_BRGH; if (BRG_mode) l_brgh = 1; else l_brgh = 0; l_txsta = 0xa4; // enable transmit function } The l_txsta assignment overwrites any result from the l_brgh assignment. This ignores any low speed settings for the serial port. Just quickly, there's a compiler bug involving conditional operators in an array index. Something like a[(?d:e]=f; has problems when g=(?d:e; a[g]=f; works fine. I haven't got the code anymore so I can't remember the details. Sorry but my trial period is about to end so I'm off to evaluate other software. Good Luck. David
  • Create New...