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 8741 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
Parents
  • Former Member
    Former Member over 15 years ago

    bonjour,

     

    j'utilise un DSPIC30F3013-30I/SODSPIC30F3013-30I/SO

    j'ai un problème avec la programmation de la memoire eeprom

    je relis bien les position mais je n'arrive pas a effacer le contenu , ni à le programmer

    y a t'il un vérouillage quelconque qui existe?

    voici le code que j'utilise, ou y at'il un bug?

     

      mov  #tblpage(posit_P1),w0
      mov  w0,NVMADRU
      mov  #tbloffset(posit_P1),w0
      mov   w0,NVMADR
      call CEEPROM
      MOV  #tblpage(posit_P1),W0
      MOV  W0,TBLPAG
      MOV  #tbloffset(posit_P1),W0
      call EEEPROM

    ;..............................................................................
    ; sous programme efface eeprom
    ;..............................................................................

    CEEPROM:
      ; Setup NVMCON to erase one word of data EEPROM
      mov  #0x4044,w0
      MOV  w0,NVMCON
      ; Disable interrupts while the KEY sequence is written
      PUSH  SR
      MOV  #0x00E0,W0
      IOR  SR
      ; Write the KEY sequence
      MOV  #0x55,W0
      MOV  W0,NVMKEY
      MOV  #0xAA,W0
      MOV  W0,NVMKEY
      nop
      nop
      ; Start the erase cycle
      BSET  NVMCON,#WR
      nop
      nop
    CEE1:
      ; attente fin ecriture
      btsc    NVMCON,#WR
      goto    CEE1  ; Re-enable interrupts
      POP  SR
      return

    ;..............................................................................
    ; sous programme ecrit eeprom
    ;..............................................................................

    EEEPROM:
      ; Write data value to holding latch
      TBLWTL  W2,[ W0]
      ; NVMADR captures write address from the TBLWTL instruction.
      ; Setup NVMCON for programming one word to data EEPROM
      MOV  #0x4004,W0
      MOV  W0,NVMCON
      ; Disable interrupts while the KEY sequence is written
      PUSH  SR
      MOV  #0x00E0,W0
      IOR  SR
      ; Write the key sequence
      MOV  #0x55,W0
      MOV  W0,NVMKEY
      MOV  #0xAA,W0
      MOV  W0,NVMKEY
      nop
      nop
      ; Start the write cycle
      BSET  NVMCON,#WR
      nop
      nop
    EEE1:
      ; attente fin ecriture
      btsc    NVMCON,#WR
      goto    EEE1
      ;Re-enable interrupts, if needed
      POP  SR
      return

     

    merci pour votre aide

     

    Gérard Micoud

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

    Bonjour,

     

    Je vous recommande de suivre la procédure décrite dans la datasheet du dsPIC30F3013.

    Il existe aussi un exemple en langage C : CE017

     

    N'oubliez pas de consulter le manuel dédié à chaque périphérique pour toute la famille dsPIC30 . Dans le cas de la mémoire E2PROM il s'agit de la section 05 que vous trouverez sur cette page, ainsi que des notes d'application.

     

    Vous pouvez vous faire aider par la communauté des utilisateurs Microchip, qui possède un forum dédié aux dsPIC : http://forum.microchip.com

     

    Des formations sur les dsPIC sont proposées tout au long de l'année dans notre centre de formation français : http://www.microchip.com/RTC

     

    Ci-joint le catalogue de nos formations

     

    Salutations

    Attachments:
    imageMicrochip_catalogue_formations_Q3B_2010_100812.pdf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 15 years ago in reply to MicrochipRTCfr

    merci pour votre réponse,

     

    j'applique bien la procedure donnée dans le datasheet . j'ai communiqué mon code dans le précedent message.

    le problème est que la memoire n'est pas écrite et qu'aucune erreur n'est générée

    je dois dire que je bute, alors que j'utilise depuis assez longtemps ce type de dspic!

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

    Bonjour Gérard,

     

     

    Avez-vous correctement initialisé les bits de configuration dans votre logiciel ? (non protection de l'E2PROM)

    Il existe également des tutoriels sur les dsPIC30 sur internet :

     

    *  http://asl.epfl.ch/index.html?content=education/courses/MicroInfo/

    * http://electronique.marcel.free.fr/#dsPIC_Microchip

    * http://www.securistreet.com/dri/dsp/support_cours_dsp.html

     

    Je vous encourage à poster votre question sur site de support technique de Microchip : http://support.microchip.com et/ou (plus rapide) sur le forum microchip dédié au dsPIC30 : http://www.microchip.com/forums/f153.aspx

     

    Salutations

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

    Bonjour Gérard,

     

     

    Avez-vous correctement initialisé les bits de configuration dans votre logiciel ? (non protection de l'E2PROM)

    Il existe également des tutoriels sur les dsPIC30 sur internet :

     

    *  http://asl.epfl.ch/index.html?content=education/courses/MicroInfo/

    * http://electronique.marcel.free.fr/#dsPIC_Microchip

    * http://www.securistreet.com/dri/dsp/support_cours_dsp.html

     

    Je vous encourage à poster votre question sur site de support technique de Microchip : http://support.microchip.com et/ou (plus rapide) sur le forum microchip dédié au dsPIC30 : http://www.microchip.com/forums/f153.aspx

     

    Salutations

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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