Jump to content

Bert

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Bert

  • Rank
    Newbrie
  1. The 16F819 is a variant of the 16F628, only with 5 A/D instead of the USART, and a few other similar trade-offs.
  2. I'm looking into writing a plug-in to simulate an async terminal hooked to the USART on the 16F87x, etc. that have one. My question is, are registers RCREG, TXREG, and pir1 supported in the plgQueryNeed and plgSupplyNeed funtions? Also, if RCIE and PEIE are enabled, will setting RCIF or setting RCREG trigger an interrupt? If not, what (if any) is the proper method to simulate interrupts from a plug-in?
  3. The following code may be causing you problems. clear_bit(rcsta,CREN); set_bit(rcsta,CREN); Generally, any two bit operations on the same register should be separated by a nop(); This is a workaround for the PIC read-modify-write problems. (It is documented in more detail in the Microchip app notes & FAQ on their web site.) I'm not sure that is the problem in this case, but the extra nop() won't hurt. Try adding it elsewhere in the code too. like when you operate on the intcon register. Also be aware that enable_interrupts() is an intcon bit operation, so the same rule applies.
  4. I believe your problem is with this line: if ( (rcsta & 00000110) == 0){ // no error It should be: if ( (rcsta & 00000110b) == 0){ // no error because of the typo you are always going into the error logic branch, and the led stays off. :cool:
×
×
  • Create New...