Jump to content

zoom

EstablishedMember
  • Content Count

    32
  • Joined

  • Last visited

Everything posted by zoom

  1. Thanks a lot Dave. The Microchip programming data sheet for the 16F1933 says: . My header file had 1E000h but the new one I just downloaded has 0xF000. 0xF000 works. Don't quite understand it, but it works. Thanks again, Colin.
  2. Hi, I cannot get the #pragma DATA _EEPROM, nn, nn, nn directive to work. EEPROM remains unchanged. Also, PICkit2 tells me the hex file is bigger that the device memory. I don't think I have data protection on anywhere. Is there anything else I need to be aware of? Thanks a lot, Colin
  3. Hi Dave. Release Notes say: Now only Win2k, WinXp, Win7 OS's supported. I suppose Vista still works? Thanks, Colin
  4. Hi, What's the maximum Tx buffer size supposed to be on a PIC16F1829 ? I'm finding 96. Thanks a lot, Colin
  5. So in PIC12F1822.TDF I changed FSR0 to FSR0L and FSR1 to FSR1L. Seems to work. Cheers, Colin
  6. Here ya go. Thanks Dave. #include <system.h> #include <stdlib.h> #pragma CLOCK_FREQ 4000000 // config clock to 4mhz. #pragma DATA _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _MCLRE_OFF & _CP_OFF & _CPD_OFF static unsigned char message[16]; void main() { unsigned char commandchar = 1; while(1) { if (commandchar != 0) { commandchar = 0; } }//while(1) } "C:\Program Files\SourceBoost\boostlink_pic.exe" -idx 1 /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib Release\Test1822.obj /t PIC12F1822 /d "C:\Program Files\SourceBoost\Samples\C\BoostC\Release"
  7. Apparently it doesn't like this (at least in my case): static unsigned char message[16]; But this is OK: static unsigned char message[8]; static unsigned char message2[8]; And so is this: unsigned char message[64];
  8. Still there. success "C:\Program Files\SourceBoost\boostlink_pic.exe" -idx 1 /ld "C:\Program Files\SourceBoost\lib" libc.pic16.lib Release\USI1822.obj /t PIC12F1822 /d "C:\Program Files\SourceBoost\Samples\C\BoostC\Release" /p USI1822 Internal Error: Var not found id:0xFF000003: in Function 'rs232TxInterruptHandler' BoostLink Optimizing Linker Version 7.01
  9. Thanks for version 7.01. I'll go ahead and update for the 16F1823 and 12F1822 and see if that error goes away. Cheers, Colin
  10. OK, if I change: unsigned char txHead; unsigned char txTail; To: unsigned char txHead=0; unsigned char txTail=0; it seems to work. I would like to know if this is correct, however. Cheers, Colin
  11. After startup the first message the PIC should send is this: A Test: Instead I get this: x??????o??????w???i*?w??????w? Test: This is with txBuffer[64]. If I change it to txBuffer[16] I get this: ??????? Test: It is only the first message. The first message is sent on command sometime after the serial port is opened. If I send a single char right after uart1Init() the problem does not occur. The garbage message is still sent but I clear the buffers when I open the serial port. Any ideas? Thanks, Colin
  12. I'm getting this error with the PIC16F1823. Internal Error: Var not found id:0xFF000003: in Function 'someFunction' BoostLink Optimizing Linker Version 7.00 I'd like to know what it means. At first I thought it was from the uart driver, but if I take that out it comes up for some other place in the code. Thanks guys, Colin
  13. EDIT: I do not now think this can be traced to rs232TxInterruptHandler. It can come from any function. I'm getting this error with the PIC16F1823. Internal Error: Var not found id:0xFF000003: in Function 'rs232TxInterruptHandler' BoostLink Optimizing Linker Version 7.00 Thanks a lot, Colin
  14. Hi, I've got some PIC16F1823 on the way. I don't see it in the list of target menu. Is it going to be supported? Thanks, Colin
  15. Well, now that you've done such a fantastic job on the UART driver, of course I would like to see some enhancements :-) None of these are even remotely critical, but if any of them are possible now I would sure like to know. 1. Some way to tell how may chars are in txBuffer[], similar to rxCnt. To tell if txBuffer[] size should be increased. 2. A switch to make uart1Tx( data ) ignore null chars. 3. Some way to do uart1Tx( array[] ). 4. Some way that uitoa_dec() for example could write directly to txBuffer[]. As I say, nothing critical here, just kind of a wish list.
  16. OK I went back to the manual and it does explain that: Thanks guys, Colin
  17. First of all, thanks for Version 7. Even the documentation is improved. The UART driver works great, but I have a question. Seems like we still need to enable the interupts, as: intcon.PEIE = 1; //enable peripheral interrupts pie1.RCIE = 1; //enable eusart Rx interrupts pie1.TXIE = 1; //enable eusart Tx interrupts intcon.GIE = 1; //enable interrupts Or am I totally misunderstanding what goes here: #define uart1Init rs232Init <PIE1,TXIE,PIE1,RCIE,RCSTA,CREN,RCSTA,SPEN> #define uart1TxInterruptHandler rs232TxInterruptHandler <PIR1,TXIF,TXREG,sizeof(txBuffer),TXSTA,TXEN
  18. Does this mapping want to be done at runtime, or can it be done at compile time? Regards Dave The pin number assignments are fixed, so compile time it is. Also I should have written: pinmap[pin] above. Thanks a lot for you help, Colin
  19. Hi, I have numbered input pins sequentially 0 through n. I want to map these pin numbers to their hardware port.pin. The concept like this: pinmap [ porta.5, porta.4, porta.3, portc.5, portc.4 ...]. And then do testpin( pinmap(pin) ); Here's what I'm doing now, but it feels like such a kludge: unsigned char port = pinmap[pin] & 11100000b; unsigned char bitnum = pinmap[pin] & 00000111b; switch (port) { case A0: //101 val = test_bit( porta, bitnum ); break; case B0: //110 val = test_bit( portb, bitnum ); break; case C0: //111 val = test_bit( portc, bitnum
×
×
  • Create New...