Jump to content

BJH

EstablishedMember
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About BJH

  • Rank
    Newbrie
  1. I can confirm that Richard is correct about the problem with adding libraries that have spaces in their path under MPLAB-X. I have been trying to use the function uitoa_hex() from the compiler documentation and I experienced the same problem with the linker. I created a directory named 'C:\SB' and moved the library there, then added it to my project. Problem solved. MPLAB-X does actually warn you about spaces in directory names having the potential to cause problems. It seems these problems start to show up when you want to add libraries to the project. BJH.
  2. I solved my problem with the repeated characters by making proper use of the buffer. My test code rendered the buffer pointless as I was processing characters every single time an interrupt was generated. So I changed my interrupt service routine so that it only processes data when the buffer has more than 7 characters in it. Elsewhere in the ISR there is another piece of code which executes every time TIMER0 overflows (about once every 0.5 seconds), and in this part of the code I flush the buffer so that any data <7 characters long that is lingering there gets processed. Now I don't
  3. Okay, now that I've had some time to play with the UART driver, I'm experiencing an intermittent transmit problem. Below are two simple functions I've written to send RS232 data; one for sending a single character, and another for sending a message: void printc(unsigned char c) { uart1Tx©; } void printm(unsigned char* message) { int i = 0; while (message != '\0') { uart1Tx(message); i++; } } To test some things I decided to use my ISR to echo anything that was received over RS232. This way I can connect a terminal to it, type some data on the termin
  4. Okay, I've got the uart driver working now. It took me a while to wrap my mind around how it's all supposed to work, mainly because I'm not too familiar with the use of templates. Thanks, BJH
  5. Ah okay, thanks for the explanation. I did consider line continuations but as C does not care about such things I didn't see why it would be needed. I didn't consider that #define statements would need to be one-liners, but obviously they would need to be. Cheers, Brian
  6. Hello all, I am trying to use the Sourceboost UART driver. I am in the process of reading the documentation so that I can get to grips with how to use it. I have encountered something that is confusing to me. On page 87 of the boostc manual that is supplied with the latest Sourceboost package, examples are given such as below: #define uart1TxInterruptHandler \ rs232TxInterruptHandler<PIR1,TX1IF,TXREG1,sizeof(txBuffer), \ TXSTA,TXEN,TXSTA,TRMT> Can someone tell me what the backslashes (\) are for? Also, with regard to the boostc manual, there seem to be differences between the m
×
×
  • Create New...