Skip to content

Commit ce1dfda

Browse files
committed
Pull request #2: PIC24E-DSPIC33E Code Examples
Merge in MCU16CE/dspic33e-code-examples from ~I15232/pic24e-dspic33e-code-examples:feature/AddDspic33eCodeExamples to develop * commit '457f05edf5838fe32e4a34f207e21dc7b173ce83': Updated README.md Updated main.json Updated readme.md Updated the readme.md Addressed review comments removed "pic24e" mention from main.json updated repo name updated jenkisnfile updated jenkinsfile Updated README added .gitignore file updated jenkinsfile updated metadata Updated metadata files updated project configuration Removed revision history from README.md Added ADC Sampling at 1.1MSPS project Added 2 projects ADC Sampling and IIR Filtering and ADC Sampling and FIR Filtering
2 parents 59ddd49 + 457f05e commit ce1dfda

File tree

54 files changed

+9752
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+9752
-36
lines changed

.citd/Jenkinsfilek8s

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ pipeline {
2626
GitHub Deploy Stage Information
2727
*/
2828
//This is the BitBucket source repo URL to be deployed
29-
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/pic24e-dspic33e-code-examples.git'
29+
BITBUCKET_SOURCE_URL = 'https://bitbucket.microchip.com/scm/mcu16ce/dspic33e-code-examples.git'
3030
//Files or folders to be excluded from deployment, if multiple files or folders use comma separator
3131
DEPLOY_EXCLUDE_FOLDER_FILE_LIST = 'mchp_private,.mchp_private,sandbox,.sandbox'
3232
//Branch(s) to be deployed, if multiple branches use comma separator. DEPLOY_BRANCH_LIST is the target branch of the PR.
3333
DEPLOY_BRANCH_LIST = "master"
34+
/*When using the main.json schema version 1.3.0 or higher, the PORTAL will first reject registration attempt when an unapproved keyword is found, but can be forced to accept.
35+
This argument is used to provide the list of unapproved keywords (also listed in main.json) which the deployment script will force the PORTAL to accept.*/
36+
UNAPPROVED_KEYWORDS_OVERRIDE_LIST="NONE"
3437

3538
/*
3639
GitHub Page Stage Information
@@ -95,10 +98,12 @@ pipeline {
9598
}
9699

97100
// Validate main.json file
98-
stage('Validate main.json') {
101+
stage('Validate main.json') {
99102
steps {
100103
script {
101-
validateMetaData()
104+
validateMetaData(
105+
unapprovedKeywordsOverrideList: "${UNAPPROVED_KEYWORDS_OVERRIDE_LIST}"
106+
)
102107
}
103108
}
104109
}

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# .gitignore file
2+
#
3+
# Set up for Microchip/MPLAB X® development
4+
#
5+
# Default gitignore files for code examples, only removing/ignoring usual MPLAB X® clutter
6+
7+
# Excluding object files
8+
*.o
9+
*.ko
10+
*.obj
11+
*.elf
12+
13+
# Excluding documentation output directories
14+
#docs/
15+
16+
# Excluding any executables
17+
*.exe
18+
19+
#Excluding Files/Folders Auto-Generated by Test Harness
20+
.generated_files/
21+
22+
# Excluding Netbeans specific build directories and file types
23+
~*.*
24+
.generated_files/
25+
nbproject/build/
26+
nbproject/dist/
27+
nbproject/private/
28+
nbproject/disassembly/
29+
build/
30+
dist/
31+
private/
32+
disassembly/
33+
*.zip
34+
!code-templates.zip
35+
*.mk
36+
*.bash
37+
*.dump
38+
Makefile-genesis.properties
39+
40+
# Excluding MPLAB X® Trace files
41+
*.log
42+
*.inx
43+
44+
# KDE specific
45+
.directory
46+
47+
# Misc
48+
.svn
49+
*.bak
50+
*.doc
51+
*.docx
52+
53+
54+

.main-meta/main.json

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,40 @@
33
"category":"com.microchip.ide.project",
44
"content":{
55
"metaDataVersion":"1.3.0",
6-
"name":"com.microchip.mplabx.project.pic24e-dspic33e-code-examples",
7-
"version":"x.x.x",
8-
"displayName":"xxxxxxxxxxxxxxx",
9-
"projectName":"pic24e-dspic33e-code-examples",
10-
"shortDescription":"xxxxxxxxxxxxxxx",
6+
"name":"com.microchip.mplabx.project.dspic33e-code-examples",
7+
"version":"1.0.0",
8+
"displayName":"DSPIC33E Code Examples",
9+
"projectName":"dspic33e-code-examples",
10+
"shortDescription":"DSPIC33E Code Examples",
1111
"ide":{
1212
"name":"MPLABX",
13-
"semverRange":">=5.40.0"
13+
"semverRange":">=5.50.0"
1414
},
1515
"compiler":{
1616
"name":"XC16",
1717
"semverRange":"^1.50.0"
1818
},
1919
"dfp":{
20-
"name":"xxxxxxxxxxxxxxx",
21-
"semverRange":">=x.x.x"
22-
},
23-
"configurator": {
24-
"name": "MCC",
25-
"semverRange": ">=4.0.1"
20+
"name":"dsPIC33E-GM-GP-MC-GU-MU_DFP",
21+
"semverRange":"^1.3.85"
2622
},
2723
"device":{
2824
"metaDataVersion":"1.0.0",
2925
"category":"com.microchip.portal.contentRef",
3026
"content":{
3127
"metaDataVersion":"1.0.0",
3228
"category":"com.microchip.device",
33-
"name":"xxxxxxxxxxxxxxx",
29+
"name":"DSPIC33EP512GM710",
3430
"versionRange":"*"
3531
}
3632
},
3733
"peripherals":[
38-
"GPIO",
34+
"ADC"
3935
],
4036
"keywords":[
41-
"GPIO",
42-
"UART"
37+
"ADC",
38+
"Filter",
39+
"Algorithm"
4340
]
4441
}
4542
}

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
![image](images/microchip.jpg)
22

3-
## PIC24E DSPIC33E CODE EXAMPLES
3+
## DSPIC33E CODE EXAMPLES
44

5-
Board Image if any.
5+
This repository contains the code examples for DSPIC33E Device Families.
66

7-
## Summary
87

98

10-
## Related Documentation
11-
12-
13-
## Software Used
14-
15-
16-
## Hardware Used
17-
18-
19-
## Setup
20-
21-
22-
## Operation
23-
249

2510

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"metaDataVersion":"1.0.0",
3+
"category":"com.microchip.ide.project",
4+
"content":{
5+
"metaDataVersion":"1.3.0",
6+
"name":"com.microchip.mplabx.project.dspic33e-adc-1msps",
7+
"version":"1.0.0",
8+
"displayName":"ADC Sampling at 1.1MSPS",
9+
"projectName":"dspic33e-adc-1msps",
10+
"shortDescription":"ADC Sampling at 1.1MSPS",
11+
"ide":{
12+
"name":"MPLABX",
13+
"semverRange":">=5.50.0"
14+
},
15+
"compiler":{
16+
"name":"XC16",
17+
"semverRange":"^1.70.0"
18+
},
19+
"dfp":{
20+
"name":"dsPIC33E-GM-GP-MC-GU-MU_DFP",
21+
"semverRange":"^1.3.85"
22+
},
23+
"device":{
24+
"metaDataVersion":"1.0.0",
25+
"category":"com.microchip.portal.contentRef",
26+
"content":{
27+
"metaDataVersion":"1.0.0",
28+
"category":"com.microchip.device",
29+
"name":"DSPIC33EP512GM710",
30+
"versionRange":"*"
31+
}
32+
},
33+
"peripherals":[
34+
"ADC"
35+
],
36+
"keywords":[
37+
"ADC",
38+
"Filter",
39+
"Algorithm"
40+
]
41+
}
42+
}

dspic33e-adc-1msps/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
![image](../images/microchip.jpg)
2+
3+
## ADC Sampling at 1.1MSPS
4+
5+
## Description:
6+
7+
In this example, ADC is set up to convert AIN0 using CH0 and CH1 sample/hold in 10-bit sequential mode
8+
at 1.1MHz throughput rate. ADC clock is configured at 13.3Mhz or Tad=75ns
9+
ADC Conversion Time for 10-bit conversion is Tc=12 * Tab = 900ns (1.1MHz).
10+
11+
void initAdc1(void);
12+
ADC CH0 and CH1 S/H is set-up to covert AIN0 in 10-bit mode. ADC is configured to next sample data immediately after the conversion.
13+
So, ADC keeps conversion data through CH0/CH1 S/H alternatively. Effective conversion rate is 1.1Mhz
14+
15+
void initDma0(void);
16+
DMA channel 0 is configured in ping-pong mode to move the converted data from ADC to DMA RAM on every sample/convert sequence.
17+
It generates interrupt after every 16 sample transfer.
18+
19+
void \__attribute\__((\__interrupt\__)) _DMA0Interrupt(void);
20+
DMA interrupt service routine, moves the data from DMA buffer to ADC signal buffer and collects 256 samples.
21+
22+
The Toggle frequency of one pulse should be around 240us(micro second), if the operating clock frequency at 40Mhz.
23+
Short AN0/AN1 with +3.3v to get analog signal for sampling. These values should be approximately around 0x7FXXX when checked in the bufferA/bufferB in the code.
24+
25+
26+
## Hardware Used
27+
28+
- Explorer 16/32 Development Board (https://www.microchip.com/DM240001-2)
29+
- dsPIC33EP512GM710 PIM (https://www.microchip.com/ma330035) or dsPIC33EP512MU810 PIM (https://www.microchip.com/MA330025-1) or dsPIC33EP256GP506 PIM (https://www.microchip.com/MA330030)
30+
31+
32+
## Software Used
33+
34+
- MPLAB® X IDE v5.50 or newer (https://www.microchip.com/mplabx)
35+
- MPLAB® XC16 v1.70 or newer (https://www.microchip.com/xc)
36+
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#
2+
# There exist several targets which are by default empty and which can be
3+
# used for execution of your targets. These targets are usually executed
4+
# before and after some main targets. They are:
5+
#
6+
# .build-pre: called before 'build' target
7+
# .build-post: called after 'build' target
8+
# .clean-pre: called before 'clean' target
9+
# .clean-post: called after 'clean' target
10+
# .clobber-pre: called before 'clobber' target
11+
# .clobber-post: called after 'clobber' target
12+
# .all-pre: called before 'all' target
13+
# .all-post: called after 'all' target
14+
# .help-pre: called before 'help' target
15+
# .help-post: called after 'help' target
16+
#
17+
# Targets beginning with '.' are not intended to be called on their own.
18+
#
19+
# Main targets can be executed directly, and they are:
20+
#
21+
# build build a specific configuration
22+
# clean remove built files from a configuration
23+
# clobber remove all built files
24+
# all build all configurations
25+
# help print help mesage
26+
#
27+
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
28+
# .help-impl are implemented in nbproject/makefile-impl.mk.
29+
#
30+
# Available make variables:
31+
#
32+
# CND_BASEDIR base directory for relative paths
33+
# CND_DISTDIR default top distribution directory (build artifacts)
34+
# CND_BUILDDIR default top build directory (object files, ...)
35+
# CONF name of current configuration
36+
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
37+
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
38+
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
39+
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
40+
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
41+
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
42+
#
43+
# NOCDDL
44+
45+
46+
# Environment
47+
MKDIR=mkdir
48+
CP=cp
49+
CCADMIN=CCadmin
50+
RANLIB=ranlib
51+
52+
53+
# build
54+
build: .build-post
55+
56+
.build-pre:
57+
# Add your pre 'build' code here...
58+
59+
.build-post: .build-impl
60+
# Add your post 'build' code here...
61+
62+
63+
# clean
64+
clean: .clean-post
65+
66+
.clean-pre:
67+
# Add your pre 'clean' code here...
68+
# WARNING: the IDE does not call this target since it takes a long time to
69+
# simply run make. Instead, the IDE removes the configuration directories
70+
# under build and dist directly without calling make.
71+
# This target is left here so people can do a clean when running a clean
72+
# outside the IDE.
73+
74+
.clean-post: .clean-impl
75+
# Add your post 'clean' code here...
76+
77+
78+
# clobber
79+
clobber: .clobber-post
80+
81+
.clobber-pre:
82+
# Add your pre 'clobber' code here...
83+
84+
.clobber-post: .clobber-impl
85+
# Add your post 'clobber' code here...
86+
87+
88+
# all
89+
all: .all-post
90+
91+
.all-pre:
92+
# Add your pre 'all' code here...
93+
94+
.all-post: .all-impl
95+
# Add your post 'all' code here...
96+
97+
98+
# help
99+
help: .help-post
100+
101+
.help-pre:
102+
# Add your pre 'help' code here...
103+
104+
.help-post: .help-impl
105+
# Add your post 'help' code here...
106+
107+
108+
109+
# include project implementation makefile
110+
include nbproject/Makefile-impl.mk
111+
112+
# include project make variables
113+
include nbproject/Makefile-variables.mk

0 commit comments

Comments
 (0)