Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
IMPETOM-Clínico
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martina Barreiro Guerra
IMPETOM-Clínico
Commits
3b59b9a5
Commit
3b59b9a5
authored
2 years ago
by
Martina Barreiro Guerra
Browse files
Options
Downloads
Patches
Plain Diff
DDS
parent
b76ca1bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Arduino/DDS.ino
+22
-0
22 additions, 0 deletions
Arduino/DDS.ino
with
22 additions
and
0 deletions
Arduino/DDS.ino
0 → 100644
+
22
−
0
View file @
3b59b9a5
/*
* Esta función se encarga de establecer el comportamiento del DDS
* Debe ser el primer comando luego de inicializado el objeto DDS
*/
void
inicializarDDS
(){
gen
.
Begin
();
gen
.
ApplySignal
(
SINE_WAVE
,
REG0
,
DDSfrecuencyRate
);
// Establece el tipo de señal y frecuencia
gen
.
EnableOutput
(
true
);
// Encendido del dispositivo DDS
}
/*
* Función que permite el seteo de una nueva frecuencia en el DDS.
*/
void
ajustarFrecuenciaDDS
(
long
int
nuevaFrecuencia
){
if
(
nuevaFrecuencia
>
DDSfrecuencyRate
&&
nuevaFrecuencia
<=
maxDDSfrecuency
){
DDSfrecuencyRate
=
nuevaFrecuencia
;
gen
.
SetFrequency
(
REG0
,
DDSfrecuencyRate
);
}
else
if
(
nuevaFrecuencia
<
DDSfrecuencyRate
&&
nuevaFrecuencia
>=
minDDSfrecuency
){
DDSfrecuencyRate
=
nuevaFrecuencia
;
gen
.
SetFrequency
(
REG0
,
DDSfrecuencyRate
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment