Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Paolino

  • Rank

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Gender
  • Location
    Vigevano - Italy
  1. At least you should extract and post a small code, in particular the one that manage the interrupt service routine. I'd like to ask you: do you clear the interrupt flag of the TIMER that goes in overflow? These flags are: - for TIMER 0: t0if or tmr0if - for TIMER 1: tmr1if - for TIMER 2: tmr2if ... Regards. Paolo.
  2. As discussed in this post, it seems that PIC12F series GPIOs are not supported in the IDE. Don't know if it could be a bug, anyway I report it. Bug description: SourceBoostIDE's plugins do not support PIC12F series GPIOs Steps to reproduce: Select, for example, the LED plugin; right button click in the plugin window, select the CONFIGURE... option. The scroll box does not contain GPIOs but only PORTs Expected behaviour: GPIO supported Is the problem 100% reproduceable: Yes IDE version: 6.89 Compiler: BoostC Compiler version: 6.89 Target device:
  3. Russ, as you have discovered looking at the datasheet, for PIC12 series the I/O ports are not called PORT such all the other PICs, but GPIO, General Purpose I/O. PIC12F675 GPIO register is mapped to address 0x05, same address of PORTA for PIC16F series. For that reason I decided to try the LED plugin configuring it as PORTA, RB2. I do not think it can be a compiler bug, because the source code is correctly compiled and linked and it works if downloaded onto a PIC12F675. If of ipothetic BUG we can talk, I think it must be found in LED, BUTTON (and other) plugins; the same code I posted, upd
  4. Russ, this is the very simple code I wrote: // Comparator module off cmcon=0x07; // ADC module off ansel=0x00; // GPIO TRISTATE config trisio=0x3B; gpio.2=1;//LED = ON; delay_ms(200); gpio.2=0;//LED = OFF; delay_ms(200); while(1); The register window is correclty updated when both "gpio.2=1" and "gpio2=0" instructions are executed, but the LED plugin does not work. That plugin is configured as led connected to PORTA pin RB2, but the led stays off (dark green or dark red). Hope this help. Thank you. Paolo.
  5. Hi guys. I was trying to debug with SourceBoostIDE a simple code written for PIC12F675 with BoostC. A LED is connected to GPIO2 and a button is connected to GPIO5; I found problems to use the plugins LED and BUTTON since I could not assign the GPIO address. I found only PORTx in menus Configure for both plugins... Is this my mistake? Where? Is there a workaround? Thank you. Paolo.
  6. Thank you Reynard, once again! Problem solved reading the GPIO ports before clearing GPIF flag. Great. Paolo.
  7. Hello guys. Here is my code for a PIC12F675: void main() { // comparator off cmcon = 00000111b; //0x07; // ADC module off ansel = 00000000b; //0x00; // I/O TRISTATE config trisio = 00111011b; //0x3B; // TMR0 enabling option_reg = 01000111b; //0x87; // TMR1 enabling t1con = 00110100b; //0x34; // waek pull-up on GPIO4 and GPIO5 wpu = 0x30; // Interrupt-on-change: GPIO4 and GIPO5 ioc = 00110000b; //0x30; // interrupt config set_bit(intcon,GPIE); set_bit(pie1,TMR1IE); // interrupt enabling set_bit(intcon,GIE); set_bit(intcon,PEIE); tmr1l=0; tmr1h=0; while(1); } and this
  8. Thank you, Dave. I promise I won't use XINT_ON till you have not implemented them I do not want anymore troubles with extended instruction set Cheers. Paolo.
  9. Dear all, I was going mad for the following experience which I share with you, maybe someone can find out the reason. Simple project: I needed to drive a 2x16 LCD and included lcd_driver.h. The PIC is a PIC18F2520, so I took care with PORTB analog settings, since PORTB is used to drive LCD. The PIC correctly runs with its internal RC-oscillator, at 8MHz. The problem comes out with a CONFIGURATION BIT: I decided to use the extended instruction set of that PIC, so I wrote: #pragma DATA _CONFIG4L, _STVREN_OFF_4L & _LVP_OFF_4L & _XINST_ON_4L & _DEBUG_OFF_4L but the L
  10. Reynard, I have optimized the DS1302 routines and now they work also if I compile them with BoostC V.6.85 I tested them also with PIC18F252 and I got no problems. Best regards. Paolo.
  11. Dear all, I am going to use the float.h and float.pic18.lib files. Since I am going to calculate floats and I need to represent them on a LCD display, I have only one idea to work-around the missing "%f" in the lprintf format; I multiplicate the float variable by 10 (for example, needing only one decimal digit), convert it into long variable and then calculate the integer part (with sign) and the decimal of that long variable. That should give me more possibilities to show a float-to-long variable on LCD... Any other ideas? Thank you. Paolo.
  12. Ooops, I do not think so! I did not do that and probably that is the reason of my troubles... Anyway, I'll check asap and if not included I will include the libc.pic18.lib library and I will make a report, but I think that the problems will go away. Thank you to have given me the direction to follow. Paolo.
  13. Project conditions: - PIC18F252 - BoostC full license - BoostC V.6.84 - MPLAB 8.01 When I compile the project in SourceBoostIDE it works, but when I compile the project inside MPLAB, I have the following problems with the linker:: BoostLink Optimizing Linker Version 6.84 http://www.sourceboost.com Copyright© 2004-2007 Pavel Baranov Copyright© 2004-2007 David Hobday Optimisation level:1 Error: Unresolved external function:'__div_32_32(unsigned long,unsigned long)' Error: Unresolved external function:'__div_32_32(unsigned long,unsigned long)' Error: Unresolved external f
  14. Dave, thank you for your prompt reply. I've checked the code I wrote to manage DS1302; in that part of code I only use nop(); or nop(); nop(); to introduce a small delay. The PIC has an oscillator of 10 MHz and it runs at 10 MHz: the PLL is turned off. Any other ideas? Thank you. Paolo.
  • Create New...