Menu

simplifications

2012-12-27
2013-01-16
1 2 > >> (Page 1 of 2)
  • picpic020960

    picpic020960 - 2012-12-27

    Hello

    I want this assembly.

    http://www.fischl.de/usbsticklogger/

    I have the component.

    the diagram programmer 'openprogrammer' can it be easier?

    (no 'Switching voltage regulator')

    thank you for your reply.

    greetings

    (Google translation)

     
  • Alberto Maccioni

    Sorry but I really don't understand what you are asking.
    The link points to a serial logger project.
    What do you need?

     
    • picpic020960

      picpic020960 - 2012-12-28

      Bonjour

      i want to load firmware in pic24fjxxgb002 with Openprogrammer and easier hardware (PIC18F2550 and some R and C ).

      if the Pic24fj is powered with 3,3v is it possible ? (like LVP programming)

      sorry for being so unclear

       
  • Alberto Maccioni

    Yes, this device requires only a 3.3V regulator and no DCDC converter.
    You can remove the unneeded components and concentrate the remaining ones in a single circuit.

     
    • picpic020960

      picpic020960 - 2012-12-29

      Bonjour ,

      other issue : i have only 4 , 20 or 24 MHZ quartz.
      (the bootloader work with 20 MHZ quartz but i will
      tried with JDM for first time )

      With MPLAB and the simulation can i find the good values of fuses

      // Define configuration registers (fuses)

      pragma config PLLDIV=3, FOSC=HSPLL_HS //for 12 MHz crystal

      pragma config CPUDIV=OSC1_PLL2, USBDIV=2

      pragma config IESO=OFF, PWRT=OFF, BOR=ON_ACTIVE, VREGEN=ON, WDT=OFF

      pragma config MCLRE=OFF, PBADEN=OFF, STVREN=ON, LVP=OFF, XINST=OFF, DEBUG=OFF

      and the RS232 (for debugging)

      TRISC &= 0xBF; // Set RC6 as an output
      TRISC |= 0x80; // Set RC7 as an input
      RCSTA   = 0x90; // Enable serial port, enable receiver
      TXSTA   = 0x24; // Asynch, TSR empty, BRGH=1
      
      // Baud rate formula for BRG16=1, BRGH=1: Baud Rate = Fosc/(4 (n + 1)),
      // or n = (Fosc / (4 * BaudRate)) - 1
      // At 48 MHz, for 115.2K Baud:
      //     SPBRGH:SPBRG = n = Fosc / (4 * 115200) - 1 = 103.17
      BAUDCON = 0x18; // BRG16=1 txd inverted
      

      // SPBRGH = 0x00; // At 48MHz, SPBRGH=0, SPBRG=103 gives 115.2K Baud
      SPBRGH = 0x02; // 0x0270 gives 19200 Baud

      if CLK_48MHZ

      // SPBRG = 103; // For 48 MHz clock
      SPBRG = 0x70; // For 48 MHz clock

      else

      SPBRG   = 52;   // For 24 MHz clock
      

      endif

      printf("USB Test Startup\r\n");
      

      thanks to help me

      Best regards

      ( Tutto Va bene !!!)

       
  • picpic020960

    picpic020960 - 2012-12-31

    Bonjour ,

    ok for the Quartz and the fuse.

    One question : why the Quartz frequency is 48 MHZ in the MPLAB simulation porject ?

    by the way Happy New Year

     
  • Vitor_Boss

    Vitor_Boss - 2012-12-31

    Read the datasheet for more information.

    For a 4MHz use "pragma config PLLDIV=1"
    For a 20MHz use "pragma config PLLDIV=5"
    For a 24MHz use "pragma config PLLDIV=6"

    If you gonna use the JDM to write PIC you can easy change the configuration bits without recompile the code. Open the Winpic800 with the firmware, go to Config. tab and change the section "Oscillator Selection" to your hardware.

    The MPLAB project is configured to run at 48MHz on pic using PLL.

     
  • Alberto Maccioni

    48 MHz is what is given to the CPU.
    PLLDIV is chosen to have 4MHz at the input of PLL.

     
    • picpic020960

      picpic020960 - 2013-01-01

      Bonjour,
      the test with the bootloader = KO
      with JDM the led blink but the Device is no good for USB enumeration.
      I want to degugging but
      the rs232 debug at 19200 bauds is not readable : one bit is < 50 us
      U(55 hexa) ==> A5
      S(53 hexa) ==> A3
      B(42 hexa) ==> A2
      is it possible that the trace are to long for the USB enumeration Process ?
      have you some solutions for my issues ?

      thanks and best rgards

       
      • Alberto Maccioni

        The serial debugger has never worked correctly with USB; it prevents proper enumeration.
        I suggest you first have a working USB programmer, then experiment with your idea, so that the serial programmer, which is extremely unreliable, is out of the game.

         
        • picpic020960

          picpic020960 - 2013-01-02

          re-Bonjour

          thanks for the information
          version without debugging Ok but some questions :
          Why firmware version 0.0.4?
          Who can i see the USB peripheric ?
          Who can i see the log ( /option log activity ) ?
          (test with 18F2550 only )
          OS : Vista

          screenshoot

          Device detected: vid=0x04D8 pid=0x0100
          Path: \?\hid#vid_04d8&pid_0100#6&36f79b7&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
          Programmer detected
          Communication timeout
          Firmware version 0.0.4
          Hardware ID: 0.0.0 (?)

           
  • Vitor_Boss

    Vitor_Boss - 2013-01-02

    Try flash the last firmware(0.0.8)

     
    • picpic020960

      picpic020960 - 2013-01-02

      Bonsoir ,

      after some unsuccesfull tests i can said :

      • the usb link with quartz 20 MHZ very fragile , just the connection with usb pin
        only , without run Openprog: blink led ( 4 hz then 1 hz then 4 hz)
      • some time Led blink 4 hz then 1 hz then i run Openprog : it found firmware version
        0.8.0 ( one time for ten tests)
      • the test is on breadboard but the hardware is very simple
      • i will test with quartz 4 MHZ : i hope it will best !
      • i never see the USB designation of Open Programmer in the 'device manager' of
        VISTA

      questions :

      • some body has test with 20 MHZ quartz ?
      • what you see in the 'device manager' when the usb connection is correct ?

      thanks and best regards

       

      Last edit: picpic020960 2013-01-02
  • Alberto Maccioni

    I think your problems come from the breadboard assembly: at high frequency you have to keep wiring very short and also load less the quatz nodes (see datasheet); or you can try to load more and have a more stable oscillation, but I don't know what is the limit.
    I cannot check right now but you should definitely see a HID device with proper VID&PID in the device manager.

     
    • picpic020960

      picpic020960 - 2013-01-03

      and with a 4 MHZ quartz ?
      perhaps with low speed USB but who do it ?
      the firmware can work slower ?

      for the device manager i see two lines with VID&PID...

      and when after Openprog is running how to see the log file

      (it is a little harder than I thought)

      Thanks

       
      • Alberto Maccioni

        4 MHz may be better in case of breadboard, and it doesn't change the USB speed: just set PLLDIV to 1.
        Pay attention to the oscillator section: use proper capacitors and short wires.
        The firmware has to run at 48 MHz.
        The log file is generated only for reads and writes to a target device.

         
        • picpic020960

          picpic020960 - 2013-01-03

          it is strange.
          with Microchip USB bootloader (a) , quartz 20 MHZ and breadboard i have no
          problem with the USB connection...
          (perhaps (a) dialog not need high performance like Openprog)
          i will test with 4 MHZ and make feedback

           
  • picpic020960

    picpic020960 - 2013-01-03

    it is strange.
    with Microchip USB bootloader (a) , quartz 20 MHZ and breadboard i have no
    problem with the USB connection...
    (perhaps (a) dialog not need high performance like Openprog)
    i will test with 4 MHZ and make feedback

     
    • Csanyi Pal

      Csanyi Pal - 2013-01-04

      Sorry, this post has nothing with this thread. It can be deleted.

      --
      Regards from Pal

       

      Last edit: Csanyi Pal 2013-01-04
      • Csanyi Pal

        Csanyi Pal - 2013-01-04

        Sorry, this post has nothing with this thread too. It can be deleted.

        --
        Regards from Pal

         

        Last edit: Csanyi Pal 2013-01-04
  • Alberto Maccioni

    It sure is strange; the USB connection should either work or not regardless of the application, it's not a matter of performance.

     
    • picpic020960

      picpic020960 - 2013-01-05

      Bonjour ,

      test with 4 MHZ quartz = KO
      is it possible that you load in your website .hex generated by your environment for
      quartz 4 MHZ and quartz 20 MHZ (exists change when i compile , linker , compiler version) ? to be sure that the problem comes from the 'hard'

      i continue search with HIDCOM for learning.

      with Op the success rate is better ...but wihout stability I can not go far

      have you USB packets trace with Snoopy (XP) ? how much packets for the enumeration ?
      when i test , 14 or 16 packets and no more

      best Regards

      'All begins with Breadboards'

      For Pal :

      comparison : same hardware (breadboard) firmware bootloader Microchip OK , Open Programmer KO

      i can't delete the double post

      thanks

       
      • Alberto Maccioni

        Here is the firmware compiled for 4 MHz quartz.
        You have not really described the problems you experience: KO is not really telling anything.
        Never traced USB, it has always been rock solid in my case.

         

        Last edit: Alberto Maccioni 2013-01-06
  • picpic020960

    picpic020960 - 2013-01-06

    Bonsoir Alberto
    thanks for the .hex. I will test tomorrow.
    i want to test PIC_HID with loading by microchip bootloader (more comfortable) but nothing run. Perhaps fuse pb.
    with loading by JDM in 'debug_print 1' i see rs232 trace.
    i insist : all these tests are made with breadboard.
    NB : some time with microchip bootloader (USB) i have BSOD :-(
    best Regards

     
  • Alberto Maccioni

    I think the problem with the bootloader has nothing to do with the breadboard; it's a functional bug: if a program is designed to run from a certain address you have to make sure it's being loaded correctly from the bootloader and is given control after some time.

     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.