Jump to content

makro2

EstablishedMember
  • Content Count

    5
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About makro2

  • Rank
    Newbrie
  1. I've sendStr function for sending strings to max3100 (UART). It works well with one (first) string, but when i try to send another then it hangs. example: this is ok sendStr("some text"); sendStr("some text"); sendStr("some text"); this hangs sendStr("some text"); sendStr("abc"); this works ok sendStr("abc"); I'm quite sure that there is no problem with sendchar. void sendStr(const char *string) { sendChar(13); sendChar(10); unsigned char i = 0; while( (string[i] != 0x00) ) { delay_us(250); sendChar( string[i++] ); } }
  2. Yes, i know how to make it, but my solution would be slow, because i'm not familiarized with bit-operations.
  3. I'd like to have a function which works like this bit( variable, bitnum, high/low ); I just added optocouplers to my project, so some signals got inverted. That's why i need easy way to invert some signals. -------------------------------------------- example: #define cs_enabled 1 #define data_high 1 bit( portb, CS, cs_enabled);
  4. I need accurate timing for my project. I'm going to use PIC16F88 (20MHz). What is the best solution for external oscillator/clock, is there accurate crystals? can i use SPG8651A (selectable output crystal oscillator) for pics oscillator...
  5. I just found rs232 example from exaples -section. Putchar doesn't work at all... i can only receive last two chars (byteu, bytel)... If there is more data to send, always the last two is only sent. There the links to the example code: http://www.picant.com/c2c/examples.html http://www.picant.com/c2c/examples/rs232/SerialCom.c.html http://www.picant.com/c2c/examples/rs232/SerialCom.h.html http://www.picant.com/c2c/examples/rs232/test232.c.html http://www.picant.com/c2c/examples/rs232/test232.h.html My code: while (1) { spi_outp(32+8, 8); spi_inp(8); putChar(bytel); if (bytel==4) { spi_outp(56, 8); spi_inp(16); putChar(65); putChar(byteu); putChar(bytel); while (getTxByteCount() != 0); delay_ms(200); } }
×
×
  • Create New...