Jump to content

marcob

EstablishedMember
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About marcob

  • Rank
    Newbrie
  1. Yes, there was an error in the code. The correct code is like this: rom char* ms1 = "XXX"; rom char* ms2 = "YYY"; char* msg; main () {... msg=ms1; } In this case, if I try to display in an LCD the value of msg, nothing appears. Instead if I remove ms1 and ms2 from rom in this way char* ms1 = "XXX"; char* ms2 = "YYY"; char* msg; main () {... msg=ms1; } the program works correctly. Can you explain me how to use the variables put in rom memory? Thank you, bye
  2. Hi. I have two Test string in rom. I want to load one with the two stringhe in one const char , but is not possible. rom char *ms1= "hello"; rom char *ms2= "HELLO"; const char *mess; // Main program entry void main() { if (.....) *mess = *ms1; else *mess = *ms2; How to solve this ! regards marco
  3. HI, Use mplab with “INCIRCUIT DEBUG " with a pic877 and compile whith boostc. I have a interap that it is cyclical with TMR0. And I want to count in input on RBO. The problem is that when I qualify interap on TMR0 also the counter on RB0 it counts, the program me seems corrected: **************************************************************/ #include <system.h> #include "lcd.h" #pragma CLOCK_FREQ 20000000 //Define device config block //#pragma DATA _CONFIG,_CP_OFF & _DEBUG_OFF & _CPD_OFF & _WRT_OFF & _LVP_OFF & _BODEN_OFF & _PWRTE_ON & _WDT_OFF & _HS_OSC #pragma DATA _CONFIG,_CP_OFF & _DEBUG_ON & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _PWRTE_ON & _WDT_OFF & _HS_OSC int int_1S; // flag interap 1 secondo int flag_1S; int val_enco,aaa; // Main program entry void main() { int_1S=100; //per ottenere 1 senondo in interap flag_1S=0; //metto zero flag 1 secondo val_enco,aaa=0; //azzero valore encoder //Init ports //A and B port initialization adcon1=00001110b; // solo ra0 analogico il resto digitale trise=00000100b; // output trisb=00000011b; // output trisd=00001111B; // d0-d3 input d4-d7 output trisc=00011000b; trisa=00000001b; porta=0x00; porte=0x00; portb=0x00; portd=0xff; // metto le uscite alte per la lettura della tastiera portc=0x0; init_LCD(); // inizializza LCD // Interupt su tmro in overflow clear_bit(intcon,GIE); clear_bit(intcon,INTF); clear_bit(intcon,T0IF); clear_bit(intcon,RBIF); clear_bit(intcon,PEIE); //--> option_reg=00000111b; //config timer0 interrupt prescaler (f/4)/256 (51.2 uS) // rbpu=0 intedg=0 set_bit(intcon,T0IE); //--> Abilita l'interrupt sul tmr0 set_bit(intcon,INTE); //--> Abilita l'interrupt sul RB0 // clear_bit(intcon,RBIE); //--> disAbilita l'interrupt sul portB (4..7) set_bit(intcon,GIE); //--> Abilita global interrupt while(1) { LCD_cmd(0x94+10); if (flag_1S==1) printf ("si"); else printf ("no"); LCD_cmd(0x80+5); Hex2Dec(val_enco); LCD_cmd(0x80+10); Hex2Dec(aaa); } } /************************************************************/ /* Process any interrupts */ /************************************************************/ void interrupt( void ) { if(T0IF){ //###### Flag int tmr0 ###### int_1S--; if(int_1S ==0) //ogni secondo { if (flag_1S==1) { flag_1S=0; int_1S=100; // ricarico il valore per 1 secondo } else { flag_1S=1; int_1S=100; // ricarico il valore per 1 secondo } } tmr0 = 60; //per ottenere 10 mS clear_bit(intcon,T0IF); //Riabilita interrupt flag } if(INTF){ //###### Flag int RB0 ###### val_enco++; clear_bit(intcon,INTF); //Riabilita interrupt flag } if(RBIF){ //###### Flag int RB4-7 ###### aaa++; clear_bit(intcon,RBIF); //Riabilita interrupt flag } } // End of Interrupt Service routine what I am mistaking?
  4. I have installed the single version MPLAB base. before: I'm copy the file of sourceboost (C:\Programmi\SourceBoost\mplab) in mplab directory (C:\Programmi\Microchip\MPLAB IDE\Core\MTC Suites). now: Excuse but I have not understood where I must copy the file "libc.pic16.lib" , in which directory of mplab. regards marco
  5. hi, im use the boost c in mplab 7,31 and when compile have a problem: the compliler is ok but : icensed to xxxxxxxxx under Single user Standard License for 1 node(s) Limitations: PIC12,PIC16 max code size:4096 words, max RAM banks:Unlimited, Non commercial use only utility.c success Executing: "C:\Programmi\SourceBoost\boostlink.pic.exe" "C:\Mio\Pic\Mio_SoftWare_PIC\prova\5450.obj" "C:\Mio\Pic\Mio_SoftWare_PIC\prova\adc.obj" "C:\Mio\Pic\Mio_SoftWare_PIC\prova\eeprom.obj" "C:\Mio\Pic\Mio_SoftWare_PIC\prova\serial.obj" "C:\Mio\Pic\Mio_SoftWare_PIC\prova\test.obj" "C:\Mio\Pic\Mio_SoftWare_PIC\prova\utility.obj" -O1 -p "prova" -t 16F876A BoostLink Optimizing Linker Version 6.35 http://www.sourceboost.com Copyright© 2004-2006 Pavel Baranov Copyright© 2004-2006 David Hobday Optimisation level:1 Error: Unresolved external function:'__div_8_8(unsigned char,unsigned char)' Error: Unresolved external symbol, function:__div_8_8 Error: Unresolved external function:'__rem_8_8(unsigned char,unsigned char)' Error: Unresolved external symbol, function:__rem_8_8 Error: Unresolved external function:'__div_8_8(unsigned char,unsigned char)' Error: Unresolved external symbol, function:__div_8_8 Error: Unresolved external function:'__rem_8_8(unsigned char,unsigned char)' Error: Unresolved external symbol, function:__rem_8_8 Error: Unresolved external function:'__rem_8_8(unsigned char,unsigned char)' Error: Unresolved external symbol, function:__rem_8_8 Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__div_16_16 Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__div_16_16 Error: Unresolved external function:'__rem_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__rem_16_16 Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__div_16_16 Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__div_16_16 Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__div_16_16 Error: Unresolved external function:'__div_16_16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__div_16_16 Error: Unresolved external function:'__mul_16u_16u__16(unsigned short,unsigned short)' Error: Unresolved external symbol, function:__mul_16u_16u__16 Failure BUILD SUCCEEDED: Fri Apr 21 11:42:19 2006 perhaps the problem is in the # includes how I must make?
  6. Thank you dave. I've downloaded the new MPLAB version and I've seen how to debug programs with ICD. Now I need to know how it is possible to integrate boostC with MPLAB. Can you suggest me how to do this? Thank you for your attention, Marco
  7. Hi everybody, I would like to know if it's possible to make a hardware debugging with boostC. I use PIC16F876/77: can I connect it with a hardware device that allows to make a debug in circuit of the program? Is it possible in BoostC? If yes, how it's possible? Do you know any URL address in which I may found some scheme to build a debugging hardware device by myself? Moreover, I would like to make another question: my username is Marco Boschi and I'm registered for the 6.x version. If I download the new version of the program (6.35) and the new plugins, am I allowed to use them? My email address is marc004@libero.it Thank you, best regards Marco
  8. Hi, I'm writing code for PIC16f876 with BoostC and I've seen a strange thing: when I debug the code and I press the "Reset button" it appears the sentence "Can't locate source line for the current instruction". Then, when I use the "Step Over" Command the same sentence appears for 3 times, and then the debug starts correctly. Do you know why? Another request: do you know why I'm permitted to write only 4k of code for this PIC instead of the 8k that can be used with 16f876? Thank you, bye marcob
  9. Hi, I'm a registered owner of sourceboost. I've uninstalled the previous version I had because I've had problems with pc, now I've installed the new version 6 and when I write the key, a window tells me that the registraion key is expired. Is this true? I need another key? Please tell me something, thanks
  10. Hi guys, I want to write a routine in order to convert an hex number into a decimal one, and the opposite. I mean, I have a number (i.e. 3A0 in Hex) and I want to display it in decimal on an LCD. I've seen the answers to the other question for the adc, but I'd like to have this routine for every number and not only till 1023. Have you got anything for me? Thanks a lot, Marco
  11. Boostc I want only to simulate the transmission Another question dave, which are exactly the differences between boostc and c2c? Thanks, regards
  12. I would like to use the terminal for being able to simulate the communication between pic16f84 and the PC. How can I make so, since I don't find how to set the pin of the pic to be connected? thanks marco
  13. I would want to know if you have a simple ruotine in order to make one seriale that it receives and it transmits with the pic 16f84.(uso boostc). If I take a ruotine made for the c2c I can use it, what is the difference between boostc and the c2c? Thanks
  14. Hi everybody, I would like to know why when debugging, the simulation timing using plugins is much slower than the real timing when the chip is programmed. Can anybody suggest me something? Regards, marco
×
×
  • Create New...