Jump to content

cdc49

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cdc49

  • Rank
    Newbrie
  1. Hi, You can also have a look at Microchip device HID bootloader somewhere in the usb framework (part of the big Microchip application library). Very useful because no driver installation on pc side (hid = native support). Use it with -rb 0x1000. Source of pic and pc side software are in the archive. This bootloader replace the old one made by microchip and it works with 2550, 4550, 24FJ and pic32. Regards, Charles
  2. Cac001, Thanks for your comparison, it 's interesting. Here is the whole code that doesn't work as expected with a 18LF1220 chip (or 18F1220) : #include <system.h> #pragma CLOCK_FREQ 40000000 #pragma DATA _CONFIG1H, _IESO_OFF_1H & _FSCM_OFF_1H & _HSPLL_OSC_1H #pragma DATA _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L #pragma DATA _CONFIG2H, _WDT_OFF_2H & _WDTPS_32K_2H #pragma DATA _CONFIG3H, _MCLRE_ON_3H #pragma DATA _CONFIG4L, _DEBUG_OFF_4L & _LVP_OFF_4L & _STVR_OFF_4L #pragma DATA _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L #pragma DA
  3. This is dangerous code as lata is also modified in the ISR. This means that part the way through the assignment lata.0 = ~lata.0; the code could get interrupted. There maybe other problems too, this is just one that I easily notice. Typically this can be fixed by disabling interrupts for the critical section of code: intcon.GIE = 0; lata.0 = ~lata.0; intcon.GIE = 1; Regards Dave Dave, I have remove the lata code (It was added to see something) in the main loop and I have always the same problem. It makes me crazy. So I have rewritten the code for C18 and everything
  4. Hi, I use a 18lf1220 at 5 volts with a 10 Mhz crystal and a frequency meter on porta.1 This small piece of code works as expected with a short delay in the main loop, but if i try to add more code the ISR fails. V6.96 and 6.97RC gives same results. I also changed the config bit to something more human ! Where's the problem ? Please ... #include <system.h> #pragma CLOCK_FREQ 40000000 #pragma DATA _CONFIG1H, _HSPLL_OSC_1H & _FSCM_OFF_1H &_IESO_OFF_1H #pragma DATA _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _BORV_27_2L #pragma DATA _CONFIG2H, _WD
×
×
  • Create New...