Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About petrm

  • Rank
  1. Hello, pls is here some limitation in rom char arrays for 16f876A? I mean I have 6x 180bytes + 2x 230bytes rom char arrays and it seems, the code isn't running in target aplication. Only when I reduce number of that arrays. Code memory is aprox. 47% used, 69 bytes used from ram. The same rom arrays are no problem for 18F452. Thanks for reply. here is example of one of 180bytes array rom char *d5 = { //180bytes 0x00, 0xB8, 0xFC, 0xFC, 0xB8, 0xB8, 0xFC, 0xFC, 0xB8, 0xB8, // 0xFC, 0xFC, 0xB8, 0xB8, 0xFC, 0xFC, 0xB8, 0xB8, 0xFC, 0xFC, // 0xB8, 0xB8, 0xFC, 0xFC, 0xB8, 0xB8, 0xFC,
  2. Try: UCHAR test[2][2] = { 1,2 , 1,2 }; Regards Dave <{POST_SNAPBACK}> Aaaah, of course, now it's working !! Dave, thanks you very much for your flash response ! King regards, Petr
  3. Pls, and what about using of multi-dimensions array in BoostC ? Pavel wrote, there is no problem to use i.e. 2D array in RAM, but this definition doesn't work : UCHAR test[][2] = { {1,2} , {1,2} }; C:\Dokumenty\RJ\wastegate regulace\boost\boost_control.c(17): error: missing semicolon C:\Dokumenty\RJ\wastegate regulace\boost\boost_control.c(17): error: failure What Am I doing wrong ?? Thanks for a reply. Petr
  4. Hi, I am a registred user of C2C 5.x . How much is C2C 6.0 for me ? (+ BoostC 6.0) Thx. PS: Is possible some discount on upgrade if I send to you some example (ex. Using Nokia 3310 LCD in C2C) Best regards . PetrM
  5. Hi, there is another problem in BoostC (target - 16F877A): const char spec1[130] = { // ASCII: 32-57 (26*5=130bytes) 0x00, 0x00, 0x00, 0x00, 0x00 , // space 0x00, 0x00, 0x2f, 0x00, 0x00 , // ! 0x00, 0x07, 0x00, 0x07, 0x00 , // " 0x14, 0x7f, 0x14, 0x7f, 0x14 , // # .. 0x06, 0x49, 0x49, 0x29, 0x1E // 9 }; const char UP_case[130] = { 0x7C, 0x12, 0x11, 0x12, 0x7C , // A 0x7F, 0x49, 0x49, 0x49, 0x36 , // B 0x3E, 0x41, 0x41, 0x41, 0x22 , // C 0x7F, 0x41, 0x41, 0x22, 0x1C , // D 0x7F, 0x49, 0x49, 0x49, 0x41 , // E 0x7F, 0x09, 0x09, 0x09
  6. Hi, I want to define a font table for graphic Nokia3310 LCD using 2D array. But there is no support for them,is it ? ex. const char font[90][5] = { {0x00, 0x00, 0x00, 0x00, 0x00}, // space {0x00, 0x00, 0x2f, 0x00, 0x00}, // ! {0x00, 0x07, 0x00, 0x07, 0x00}, // " ... ... {0x44, 0x64, 0x54, 0x4C, 0x44 } // z }; Is there any solution for this ? Thx.
  7. Hi, example (C2C+ 5.5.1): while (pir1 & 100000b); compiler makes: label_0070 btfss _pir1, 5 goto label_0071 goto label_0070 label_0071 This is absolutely OK. But if I want this: while (~pir1 & 100000b); (or while ((pir1 & 100000b))!=1; ) compiler makes: label_0058 comf _pir1, W andlw D'32' sublw 0 btfsc STATUS, Z goto label_0059 goto label_0058 instead of: (it's enough simply label_58 btfsc _pir1,5 goto label_59 goto label_58 label_59 Is there some way, how to "learn " compiler to make this better code ? Of course, this i
  8. Hello, To Pavel: I tested two PIC18 compilator with floating point code,listed in previous (losted messages. And these results are very interesting: Microchip C18 v.2.20 demo - Hitech PICC-18.v.8.30 demo Code size: 10536 b - 2693b ! Speed 1: 506 cycl. - 1008 cycl. Speed 2: 491 cycl. - 892 cycl. Speed 1 is time to complete this : DC=(float)t1/t0; Speed 2 is time to complete this : T =((DC - 0.32) / 0.0047); It's interesting, that Michrochip prefer speed at the expense of size. But if I tried make these calculatio
  9. I am trying new version of PICANT 5.0.7 (C2C comp.) and I have problems with the debugger (in debugging mode): 1] when I set interrupt flag INTF in INTCON register (INTE=GIE=1), after this tick counter count still 16 ticks (4 instr.) to reach _interrupt code reached in next instruction cycle (4 ticks) - that's it also in real PICs, isn't it ? 2] when I want to change PORTA or PORTB values (in Registers bar), it is strange, sometimes is change successful (not often), sometimes no (or is set something else) - for ex. I change PORTA (from 0) to 120, but debugger set 104 in next cycle or
  10. Hi, I need convert number from 10bit A/D (16F819) to voltage, 1023=5.0V,512=2.5V => 1023/204=5.11V; but if I try this: [AD_Result=245 => 1.20V] voltage_t=AD_Result / 204; // result is 1 - OK voltage_o=AD_Result % 204; // result is 41 ?? So why is 245 % 204 = 41 and not 2 ?...... Thx for help. Petr M.
  • Create New...