Skip to content

Commit

Permalink
Pull request #1: dsPIC33A EEPROM Emulation Demo
Browse files Browse the repository at this point in the history
Merge in MCU16CE/dspic33a-curiosity-data-eeprom-emulation-demo from ~I15232/dspic33a-curiosity-data-eeprom-emulation-demo:feature/dspic33ak-dee-demo to develop

* commit 'b5261ad69355b42335bcfda320955d70a2742406':
  Addressed review comment
  Addressed review comments
  Jenkinsfile updated
  Remove unnecessary file
  Renamed project
  updated projectname
  Updated project name
  renamed project name
  Updated changelog
  Updated README
  dsPIC33AK DEE Demo
  • Loading branch information
harishagari committed Nov 5, 2024
2 parents bcb9088 + b5261ad commit e33504c
Show file tree
Hide file tree
Showing 53 changed files with 5,809 additions and 26 deletions.
24 changes: 22 additions & 2 deletions .citd/Jenkinsfilek8s
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pipeline {
agent {
kubernetes {
inheritFrom 'dspic33ak-curiosity-data-eeprom-emulation-demo-github-deployment'
inheritFrom 'dspic33a-curiosity-data-eeprom-emulation-demo-github-deployment'
defaultContainer 'xc16-mplabx-sonar-fmpp-python'
yamlFile '.citd/cloudprovider.yml'
}
Expand All @@ -27,7 +27,7 @@ pipeline {
GitHub Deploy Stage Information
*/
//This is the BitBucket source repo URL to be deployed
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/dspic33ak-curiosity-data-eeprom-emulation-demo.git'
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/dspic33a-curiosity-data-eeprom-emulation-demo.git'
//Files or folders to be excluded from deployment, if multiple files or folders use comma separator
DEPLOY_EXCLUDE_FOLDER_FILE_LIST = 'mchp_private,.mchp_private,sandbox,.sandbox'
//Branch(s) to be deployed, if multiple branches use comma separator. DEPLOY_BRANCH_LIST is the target branch of the PR.
Expand All @@ -52,6 +52,9 @@ pipeline {
Project Build Stage Information
*/
MPLABX_PROJECT_SOURCE = "../"

/* Hex file commit */
HEX_FILE_COMMIT = 'true'
}

triggers {
Expand Down Expand Up @@ -149,6 +152,23 @@ pipeline {
}
}
}

// Committing hex files
stage('Commit Hex File'){
when {
anyOf{
allOf {
not { changeRequest() }
expression { return env.HEX_FILE_COMMIT == 'true' && env.CHANGE_TARGET == 'develop' }
}
}
}
steps {
script {
commitHexFile()
}
}
}

// GitHub repo creation
stage('GitHub Repo Creation') {
Expand Down
31 changes: 18 additions & 13 deletions .main-meta/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
"category":"com.microchip.ide.project",
"content":{
"metaDataVersion":"1.3.0",
"name":"com.microchip.mplabx.project.dspic33ak-curiosity-data-eeprom-emulation-demo",
"version":"x.x.x",
"displayName":"xxxxxxxxxxxxxxx",
"projectName":"dspic33ak-curiosity-data-eeprom-emulation-demo",
"shortDescription":"xxxxxxxxxxxxxxx",
"name":"com.microchip.mplabx.project.dspic33a-curiosity-data-eeprom-emulation-demo",
"version":"1.0.0",
"displayName":"dsPIC33A Curiosity Data EEPROM Emulation Demo",
"projectName":"dspic33a-curiosity-data-eeprom-emulation-demo",
"shortDescription":"dsPIC33A Curiosity Data EEPROM Emulation Demo",
"ide":{
"name":"MPLABX",
"semverRange":">=5.40.0"
"semverRange":">=6.20.0"
},
"compiler":{
"name":"XC16",
"semverRange":"^1.50.0"
"semverRange":"^3.10.0"
},
"dfp":{
"name":"xxxxxxxxxxxxxxx",
"semverRange":">=x.x.x"
"name":"dsPIC33AK-MC_DFP",
"semverRange":">=1.0.33"
},
"configurator": {
"name": "MCC",
Expand All @@ -30,13 +30,18 @@
"content":{
"metaDataVersion":"1.0.0",
"category":"com.microchip.device",
"name":"xxxxxxxxxxxxxxx",
"name":"dsPIC33AK128MC106",
"versionRange":"*"
}
},
"keywords":[
"GPIO",
"UART"
"peripherals": [
"UART",
"FLASH"
],
"keywords": [
"EEPROM",
"DEE",
"Data EEPROM Emulation"
]
}
}
56 changes: 47 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,67 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="images/microchip_logo_white_red.png">
<source media="(prefers-color-scheme: light)" srcset="images/microchip_logo_black_red.png">
<img alt="Microchip Logo." src="images/microchip_logo_black_red.png">
</picture>
![image](images/microchip.jpg)

## dspic33ak curiosity data eeprom emulation demo
## dsPIC33A Curiosity Data EEPROM Emulation Demo

Board Image if any.

## Summary

Microchip Technology Inc., has expanded its product portfolio to include a wide variety of cost-effective PIC® Microcontrollers (MCUs) without an internal data EEPROM.

Many applications store nonvolatile information in the Flash program memory using table read and write operations. Applications that need to frequently update these data may have greater endurance requirements
than the specified Flash endurance for the MCU/Digital Signal Controller (DSC) devices.

The alternate solution of using an external, serial EEPROM device may not be appropriate for cost-sensitive or pin-constrained applications.

This Data EEPROM Emulation library presents a third alternative that addresses these issues. This library features an interface similar to an internal data EEPROM, which
uses available program memory and can improve endurance by a factor as high as 500.

This code example demonstrates the usage of Data EEPROM Emulation Library.

## Related Documentation

- dsPIC33AK128MC106 microcontroller (https://www.microchip.com/dsPIC33AK128MC106)
- Emulating Data EEPROM for PIC18 and PIC24 MCUs and dsPIC33 DSCs (https://www.microchip.com/en-us/application-notes/an1095)

## Software Used

## Software Used

- MPLAB® X IDE v6.20 or newer (https://www.microchip.com/mplabx)
- MPLAB® XC16 v3.10 or newer (https://www.microchip.com/xc)
- Any of the serial terminal application. Example: Tera Term (https://ttssh2.osdn.jp/index.html.en)


## Hardware Used

- dsPIC33AK Curiosity Development Board (https://www.microchip.com/EV74H48A)
- dsPIC33AK128MC106 GP DIM (https://www.microchip.com/ev02g02a)
- USB Type-c Cable


## Setup
### Terminal Setup (Tera Term)
1. Launch Tera Term
2. Go to File -> New Connection.
3. Select the "Serial" option and select the correct COM Port from the dropdown menu.

![COM port selection](images/tera_term_COM_port_selection.jpg)

4. Go to Setup -> Serial port and ensure that the settings match the following:

![Tera Term Serial Port Settings](images/tera_term_serial_port_menu.jpg)

## Operation
This demo runs the Data EEPROM Emulation , if emulation is successful then prints the message as shown below

![image](images/success.jpg)

If emulation fails then prints the message as shown below.

![image](images/failure.jpg)


## Accessing Data EEPROM Emulation Library

| Device Family | Procedure |
| ----------- | ----------- |
| Devices supported on Melody| 1. Create project <br> 2. Launch MCC <br> 3. "Data EEPROM Emulation Library "will be available under "Libraries", if not available use content manager to download it. <br> <img src="images/DEEMelody.jpg" width="600"> |

For more information refer: https://www.microchip.com/en-us/software-library/dspic33-pic24-data-eeprom-emulation
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# dspic33ak-curiosity-data-eeprom-emulation-demo v1.0.0
# dspic33a-curiosity-data-eeprom-emulation-demo v1.0.0
### Release Highlights


Initial release of dsPIC33A Data EEPROM Emulation Demo

### Features Added\Updated

Expand Down
113 changes: 113 additions & 0 deletions dspic33a-curiosity-dee-demo/dspic33a-curiosity-dee-demo.X/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL


# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib


# build
build: .build-post

.build-pre:
# Add your pre 'build' code here...

.build-post: .build-impl
# Add your post 'build' code here...


# clean
clean: .clean-post

.clean-pre:
# Add your pre 'clean' code here...
# WARNING: the IDE does not call this target since it takes a long time to
# simply run make. Instead, the IDE removes the configuration directories
# under build and dist directly without calling make.
# This target is left here so people can do a clean when running a clean
# outside the IDE.

.clean-post: .clean-impl
# Add your post 'clean' code here...


# clobber
clobber: .clobber-post

.clobber-pre:
# Add your pre 'clobber' code here...

.clobber-post: .clobber-impl
# Add your post 'clobber' code here...


# all
all: .all-post

.all-pre:
# Add your pre 'all' code here...

.all-post: .all-impl
# Add your post 'all' code here...


# help
help: .help-post

.help-pre:
# Add your pre 'help' code here...

.help-post: .help-impl
# Add your post 'help' code here...



# include project implementation makefile
include nbproject/Makefile-impl.mk

# include project make variables
include nbproject/Makefile-variables.mk
Loading

0 comments on commit e33504c

Please sign in to comment.