Skip to content
Snippets Groups Projects
Commit 19309040 authored by Mitalee Parikh's avatar Mitalee Parikh
Browse files

empro update2

parent 6b52f5a4
No related branches found
No related tags found
No related merge requests found
Pipeline #253674 passed
......@@ -109,7 +109,8 @@ For this after uploading the code using the FabISP, it needs to be removed and c
TX (hello) and RX(FTDI board) are connected and RX (hello board) to TX (FTDI board) are connected.
Basically when one transmits, the other receives.
FTDI is the protocol for communication. It can be connected in various ways.
FTDI is the protocol for communication. It can be connected in various ways:
1. Through a commercial board like this:
![](./images/input/ftdi-com-board.jpg)
......@@ -120,11 +121,17 @@ FTDI is the protocol for communication. It can be connected in various ways.
![](./images/input/ftdi-diy-board.jpg)
I use a DIY board I borrowed from Steven.
You can use this schematic to make a ftdi board.
![](./images/input/ftdi-schematic.jpg)
You can use [this schematic](./images/empro/ch330_ftdi.zip) to make a ftdi board.
I also attempted at making my own using Stevens simple design.
Traces:
![](./images/ep/trace.jpeg)
Outline:
![](./images/ep/outline.jpeg)
I used a t45 based hello board as well.
So after uploading the blink code + serial, connect the ftdi board to hello board, and on pening the serial monitor, it should show the status of the LED.
So after uploading the blink code + serial, connect the ftdi board to hello board, and on opening the serial monitor, it should show the status of the LED.
![](./images/input/screenshot.jpg)
......@@ -133,7 +140,7 @@ So after uploading the blink code + serial, connect the ftdi board to hello boar
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).
This is the [code file for t45](./images/empro/t45-blink-avr-gcc.zip)
```
#include <avr/io.h>
#include <util/delay.h>
......@@ -154,19 +161,35 @@ const int sw=PB3;
}
```
Basically you inlcude avr/io and delay libraries so that you can use the arduino commands.
and [for t44](./images/ep/hello.ftdi.44.blink.zip) with the makefile.
```
#include <avr/io.h>
#include <util/delay.h>
// #define F_CPU 1000000UL // 1 MHz internal RC
int main(void){
DDRB |= 1<<PB2; // set PB2 as output
PORTB |= ~(1<<PB2); // turn LED off
while (1){
PORTB = ~(PINB & (1<<PB2)); // invert LED status
_delay_ms(1000); // 1 sec delay
}
}
```
Basically you include 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 #.
![](./images/empro/gif.gif)
5. Programming with Atmel Studio
---
Can't in mac. will do this later on a windows system...
Can't do this in macOS. Will try to do this later on a windows system...
5. References
---
6. Code files
---
[Code (sketch) for programming with FabISP + Arduino IDE](docs/images/empro/led-button-44.zip)
[Code (sketch) for programming with FabISP + Arduino IDE](./images/empro/led-button-44.zip)
[avr-gcc blink for t44](./images/ep/hello.ftdi.44.blink.zip)
[avr-gcc blink for t45](./images/empro/t45-blink-avr-gcc.zip)
File added
File added
docs/images/ep/outline.jpeg

21.8 KiB

docs/images/ep/trace.jpeg

64.8 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment