element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Microchip
  • Products
  • Manufacturers
  • Microchip
  • More
  • Cancel
Microchip
Forum Need technical help from Microchip? Ask our Expert!
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Microchip to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 112 replies
  • Subscribers 24 subscribers
  • Views 8804 views
  • Users 0 members are here
  • help
  • microchip
  • expert
  • mike_mcglade
  • questions
Related

Need technical help from Microchip? Ask our Expert!

nlarson
nlarson over 15 years ago

This thread has been closed to new questions.

However, we welcome you to Post Your Question about Embedded in the element14 Community Embedded group. You'll find many fellow members and experts who have just the answer you're looking to find! 

 

Thank You, Your Friends at element14 Community

MikeMcGlade

Mike McGlade

Mike has 16 years of experience with Microchip products including MCU, Memory & Analog.  He also has significant knowledge of lighting, safety & security and vending industries.

 


  • Sign in to reply
  • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 13 years ago in reply to Former Member

    Hi,

     

    The Coprocessor0 timer (count register) is running at half the PCU speed. It's a permanent free running timer (there is no way to stop it if the CPU is running unless you use debug register).

     

    When you restart your SW it may happen that the count register has overflowed the compare register. In this case, it will only generate an interrupt after reaching 0xFFFFFFFF.

     

    I made the experiment yesterday on my starterkit. Let's assume you run at 80MHz and you generate an interrupt every 1 ms with the coretimer.

     

    It means you put 4.000.000 into the compare register.

     

    When you stop the running program, when you restart your program the counter may have overflowed 4.000.000.

     

    Let's take an example : let's imagine  counter register has reached 4.000.001 ( 0x3D 0901) when you restart.

     

    To get the next Coprocessor timer, it will take ( 2^32 )    0x1 00000000 -  0x3D 0901 = 4.294.967.296 - 4.000.001 = 4.290.967.295 counts to reach interrupt.

     

    The internal timer increments at half the CPU clock i.e every 25ns so it takes : 107 seconds (1mn 47s)

     

    I did the experiment myself and in fact you'll see that interrupts restart after (maximum) a couple of minutes. It depens of your compare value and how long you waited before restarting your SW.

     

    If you push RESET icon in MPLAB, you'll see that coprocessor timer interrupts operate as expected.

     

    In the C32 compiler manual, you'll find at section 5.7.2.9.3 that the count bit in the debug register enable the user to control if count register continues incrementing or not during debug.

     

    I did not experiment it but it should work ;=)

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to MicrochipRTCfr

    Ok thank you. I will try to configure the debug register...

    I didn't wait so long to see if the timer reach the interrupt, but it seems logical.

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago

    Hi Mike,

     

     

     

    I have just bought the PIC18F4331 because I am needing to use 4 PWM outputs in a project, but I'm having troubles with the programming... everytime I try to program the PIC, it shows me an error like this.... "ERROR-> De escritura en dirección 0x000000"

    I have already changed the USB cable, I used PIC PROG 800  with the WINPic 800 program, I used Masterprog also, and it keeps making the same error.

     

    These programmers work very well programming the PIC18F4550.

     

    Some people told me that mi PIC was broken down, but I bought 5 of them, and they are new, and all of them make the same error.

     

    So I was thinking about a problem in my Configuration bits.

     

    Any suggestions on how I could make things work with this PIC, or if I have to buy another programmer , would be appreciated..

     

    Thanks

     

    Luis Moran

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago

    Good evening,

    I need your help with the testing program STM32L152RBT6STM32L152RBT6 because every time I write a personal program by following the guides and the examples I will execute without errors but when I dump the card I notice STM32L152RBT6STM32L152RBT6 qu'iln'ya no response and nothing new is happening?

    well thank you to answer me because I need your help and it is urgent because it is una advantage of my project about the end of PFE study that I need to file the report before the end of May and thank you very much

    Hello and best regards,

    Cordialment

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 13 years ago in reply to Former Member

    Hi Ayari,

     

    This forum is dedicated to PIC microcontrollers only...If you want support for STM32L152RBT6STM32L152RBT6, you should go to the website of the maker of this product.

    If you use a Microchip 32 bits (PIC32MX), you can get support on this website

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Hi, just a quick general question..
    Im doing a little bit of research and I haven't been able to find the ESD Human Body Model rating for any of Microchips PIC family of controllers.

    If you can help me with this information I would really appreciate it!

    Thanks,

    Teresa

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • samplerman
    samplerman over 12 years ago in reply to Former Member

    Hi Teresa

    I found this info on the microchip website

    http://support2.microchip.com/KBSearch/KB_StdProb.aspx?ID=SQ6UJ9A001VUZ

     

    ESD searches on thier website seem to bring up a few results like this.

     

    thanks

     

    Carl

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to samplerman

    Thx carl , this info is all over our website , some folk have no idea how to find things eh ? Cheers mike

     

    Sent from my iPhone

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago

    Hey Mike.

     

    My friend and I recently bought an NXP-LPC1313FBD48 and an FTDI TTL-232R-3v3 cable(part 34M887

    ) and we were wondering:

     

    1. What pinss on the MCU we would connect the cable to.

    2. How we could connect the ports of the MCU to the cable (because it looks like the ports on the cable are too big for the pins on the MCU)

    3. Could we use the Flashmagic software to do this and if so what is the baud rate and the Xtal frequency of the MCU?

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • MicrochipRTCfr
    MicrochipRTCfr over 12 years ago in reply to Former Member

    Hi Jack,

     

    This forum is dedicated to MICROCHIP products only...If you want support for NXP-LPC1313FBD4, you should go to the website of the maker of this product.

     

    If you use a Microchip 32 bits (PIC32MX) or any other MICROCHIP device, you can get support on this website ;=)

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube