Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
ring
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
pub
ring
Commits
f64a3154
Commit
f64a3154
authored
2 years ago
by
Neil Gershenfeld (test)
Browse files
Options
Downloads
Patches
Plain Diff
add RP2040
parent
ee26fea8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#24274
passed
2 years ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GPIO/RP2040/ring.RP2040.ino
+56
-0
56 additions, 0 deletions
GPIO/RP2040/ring.RP2040.ino
GPIO/RP2040/ring.RP2040.py
+19
-0
19 additions, 0 deletions
GPIO/RP2040/ring.RP2040.py
with
75 additions
and
0 deletions
GPIO/RP2040/ring.RP2040.ino
0 → 100644
+
56
−
0
View file @
f64a3154
//
// ring.RP2040.ino
// RP2040 ring oscillator test
// connect P1 and P2
//
// Neil Gershenfeld 12/26/22
//
// This work may be reproduced, modified, distributed,
// performed, and displayed for any purpose, but must
// acknowledge this project. Copyright is retained and
// must be preserved. The work is provided as is; no
// warranty is provided, and users accept all liability.
//
void
setup
()
{
//
// nothing to do in first core
//
}
void
loop
()
{
}
void
setup1
()
{
//
// use second core to avoid Arduino interrupts
//
pinMode
(
2
,
OUTPUT
);
}
void
loop1
()
{
//
// direct port I/O version
// 9.17 MHz at 133 MHz clock
//
uint32_t
pin1
=
(
1
<<
1
);
uint32_t
pin2
=
(
1
<<
2
);
while
(
1
)
{
if
(
pin1
&
sio_hw
->
gpio_in
)
sio_hw
->
gpio_clr
=
pin2
;
else
sio_hw
->
gpio_set
=
pin2
;
}
//
// Arduino version
// 584 kHz at 133 MHz clock
//
/*
while (1) {
if (digitalRead(1))
digitalWrite(2,LOW);
else
digitalWrite(2,HIGH);
}
*/
}
This diff is collapsed.
Click to expand it.
GPIO/RP2040/ring.RP2040.py
0 → 100644
+
19
−
0
View file @
f64a3154
#
# ring.RP2040.py
# RP2040 ring oscillator test
# connect P1 and P2
#
# Neil Gershenfeld 12/25/22
#
# This work may be reproduced, modified, distributed,
# performed, and displayed for any purpose, but must
# acknowledge this project. Copyright is retained and
# must be preserved. The work is provided as is; no
# warranty is provided, and users accept all liability.
#
from
machine
import
Pin
machine
.
freq
(
133000000
)
p1
=
Pin
(
1
,
Pin
.
IN
)
p2
=
Pin
(
2
,
Pin
.
OUT
)
while
(
True
):
p2
.
value
(
1
-
p1
.
value
())
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