Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mitalee.parikh
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
Container Registry
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
Academany
Fab Academy
2020
Fab Academy 2020 Labs
Barcelona
Barcelona students
mitalee.parikh
Commits
8631a049
Commit
8631a049
authored
3 years ago
by
Mitalee Parikh
Browse files
Options
Downloads
Patches
Plain Diff
empro +
parent
82baa82e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#253298
passed
3 years ago
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/Embedded Programming.md
+28
-2
28 additions, 2 deletions
docs/Embedded Programming.md
docs/images/empro/gif.gif
+0
-0
0 additions, 0 deletions
docs/images/empro/gif.gif
docs/images/empro/t45-blink-avr-gcc.zip
+0
-0
0 additions, 0 deletions
docs/images/empro/t45-blink-avr-gcc.zip
with
28 additions
and
2 deletions
docs/Embedded Programming.md
+
28
−
2
View file @
8631a049
...
...
@@ -110,12 +110,38 @@ So after uploading the blink code + serial, connect the ftdi board to hello boar
4. Programming with avr-gcc
---
http://archive.fabacademy.org/archives/2016/doc/makefile.html
I used Arduino IDE and the same physical setup (FabISP+ribbon cable+ hello board) and wrote the code in avr-gcc.
Arduino IDE operates avr-gcc in the background. And has an interface over it. So it works easily.
This is the
[
code file
](
docs/images/empro/t45-blink-avr-gcc.zip
)
.
```
#include <avr/io.h>
#include <util/delay.h>
const int led=PB4;
const int sw=PB3;
int main(){
DDRB |= (1<<led);
DDRB &= ~(1<<sw);
while (1){
if (!(PINB & (1<<sw)))
PORTB |= (1<<led);
else
PORTB &= ~(1<<led);
}
}
```
Basically you inlcude avr/io and delay libraries so that you can use the arduino commands.
Also, the pin numbers are recognised by their ports PB# instead of pin #.

5.
Programming with Atmel Studio
---
can't in mac. will do this later on a windows system...
5. References
...
...
This diff is collapsed.
Click to expand it.
docs/images/empro/gif.gif
0 → 100644
+
0
−
0
View file @
8631a049
220 KiB
This diff is collapsed.
Click to expand it.
docs/images/empro/t45-blink-avr-gcc.zip
0 → 100644
+
0
−
0
View file @
8631a049
File added
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