Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About lutcho

  • Rank
  1. I'm working on a LCD panel and need to code the fonte table. I'm doing something like this: char TabelaChr(char letter, char position){ char FontLookup[] ={ 0x00, 0x00, 0x2f, 0x00, 0x00, // ! 0x24, 0x2a, 0x7f, 0x2a, 0x12, // $ 0xc4, 0xc8, 0x10, 0x26, 0x46, // % 0x00, 0x60, 0x60, 0x00, 0x00, // . (and so on) When compiling, SouceBoost 5.3 & 5.4 says: Not enough RAM. If I delete parts of the table, it goes OK. The point is that my code is quite small and the whole table has 225 chars and everything fits inside a 16F628 leaving a lot of room. I wou
  2. Yes,I had. Using the LCD_Lprintf function: void LCD_Lprintf( const char *lcdptr ) { char pi; pi = 0; // Check for end of string while( lcdptr[pi] != 0) { LCD_Write_4_Bit( lcdptr[pi++] );// Display on LCD } } with something like: LPrintf("Test"); LPrintf("Test again"); System reatarts or behaves weird after printing the first string correctly. I tried saving the strings in the EEPROM, pointing to the fisrt char and using putchar() in a loop instead and it worked. regards
  3. After I formatted the HD and resinstalled PicAntIDE 5.08 (it was running under Win98 and now under Win2000pro) I get this warning when compiling a projetc for the PIC16F628: Compiling... Warning: Can't map context saving variables into mapped ram area. Check if the piccont4.pat or piccont2.pat script is used (in the 'Scripts' directory) Looking at the directory, the only .pat files are: Sxsys.pat and Picsys.pat Any idea? Regards
  4. If I code something like: char i,x,test[10]; for(i=0;i<10;i++) x = char_to_bcd(test); It locks the C++ compiler. However, if I change it to: char aux; for(i=0;i<10;i++){ aux = test; x = char_to_bcd(aux); } It works fine. Possibly a bug around here?
  5. It would also be a good idea to show statistics of the memory usage (program and data areas) after compilation. When the code gets close to 100% it's boring to compile and the scroll the .lst file to take a look at the memory map to see how much is left.
  6. Interesting: If I create a new project, the compilation is like yours. But if I open my original project, even if I select the target as 16F876 (or 16F876A) (includes are correct) it compiles just like my first example. The project was originally written for 16F628 and recently "upgraded" to 876A. Copying and pasting the code into new files corrected the problem. Is there a bug around??? Correction: Yes, there is a bug here... There was an #include <p16f628> in one of the source code files... Sorry
  7. How can I put more than one #pragma DATA in a project? When I try, I get an: asm error: wrong code page with 2 #pragma DATA lines But if I try to put all data together, I get a read overflow error. How can I write all data eeprom without copying & pasting at the .asm file before assembling?
  8. I was writing a code to write to the EEPROM on a PIC16F876A. The line (just an example, it happens in other lines also) while(eecon1 & 2); //WR test was compiled as: label_0111 bsf STATUS, RP0 bcf STATUS, RP1 btfss _eecon1, 1 goto label_0112 goto label_0111 label_0112 Well, my question is: Since the eecon1 register address is 18C (bank 3), shouldn't the page switches be both set??
  9. When I try to compile a project I get an error message stating: --------------------------------------------- Compiling... C:\ARQUIV~1\PICANT~1\C2CPP.EXE -PPIC16F648A -SRC -ols -md -O2 -W1 -Ip16F648A.inc -oC:\JOGOS_~1\LEDS\ROLETA\roleta.asm APOSTA.CPP CREDITOS.CPP MAIN.CPP MAPAS.CPP C2C++ 5.0.7e C/C++ compiler Copyright© 1998-99,2000-2003 by Pavel Baranov support@picant.com (Extended version) Licensed to: // I shall not tell it here... APOSTA.CPP CREDITOS.CPP MAIN.CPP MAPAS.CPP line 10: Internal error #g10 Finished. Done Failed If I edit the code,
  • Create New...