Skip to content

Commit

Permalink
Move project description to their own README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zst123 committed Dec 24, 2017
1 parent 8b87584 commit 7c62abf
Show file tree
Hide file tree
Showing 22 changed files with 229 additions and 159 deletions.
13 changes: 9 additions & 4 deletions projects-keil/16x2-LCD-PWM_MX/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

### Description

This is a Hello World project using Adafruit 16x2 HD44780 character LCD display (with RGB Backlight).
This is a Hello World project using Adafruit 16x2 HD44780 character LCD display (with RGB Backlight).

An LCD library (`mylcd.h/mylcd.c`) is created from scratch.
An LCD library (`mylcd.h/mylcd.c`) is created from scratch.

To control the RGB backlight, inverted PWM is generated on PA[1:3]
(active-low backlight)
To control the RGB backlight, inverted PWM is generated on PA[1:3]
(active-low backlight)

---

IDE:
- Keil uVision 5

### Pin Connections

***Take note of the separate 5V supply from the MCU's 3V3 supply***
Expand Down
5 changes: 5 additions & 0 deletions projects-keil/PWM-MusicalTone_MX/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@

PC13 is the on-board LED. It is active-low and
is turned on when the tone is playing.

---

IDE:
- Keil uVision 5
33 changes: 33 additions & 0 deletions projects-sw4stm32/ADC-PWM_HAL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ADC-PWM_HAL

STM32F103C8T6
Blue Pill Board

This project is to make use of ADC and PWM.

A potentiometer is attached to PA0 (ADC1, Channel 0)

One LED is connected on PA8 (TIM1, Channel 1)
Its brightness is controlled by the pot.

Another LED is connected on PA10 (TIM1, Channel 3)
It fades from 0% to 100% repeatedly (triangle wave)

---

IDE:
- SW4STM32


## References

+ ADC
- http://microtechnics.ru/en/stm32cube-stm-and-adc-analog-to-digital-converter/
- https://visualgdb.com/tutorials/arm/stm32/adc/
- https://electronics.stackexchange.com/questions/202938/stm32-adc-conversion-using-hal

+ PWM
- https://electronics.stackexchange.com/a/239783
- https://stackoverflow.com/questions/43483762/using-stm32-hal-timer-and-adjusting-the-duty-cycle-of-a-pwm-signal
- https://www.waveshare.com/wiki/STM32CubeMX_Tutorial_Series:_PWM
- https://www.youtube.com/watch?v=Ql6klWiROik
27 changes: 0 additions & 27 deletions projects-sw4stm32/ADC-PWM_HAL/src/main.c
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* This project is to make use of ADC and PWM.
*
* A potentiometer is attached to PA0 (ADC1, Channel 0)
*
* One LED is connected on PA8 (TIM1, Channel 1)
* Its brightness is controlled by the pot.
*
* Another LED is connected on PA10 (TIM1, Channel 3)
* It fades from 0% to 100% repeatedly (triangle wave)
*
*
* References:
* - ADC
* http://microtechnics.ru/en/stm32cube-stm-and-adc-analog-to-digital-converter/
* https://visualgdb.com/tutorials/arm/stm32/adc/
* https://electronics.stackexchange.com/questions/202938/stm32-adc-conversion-using-hal
* - PWM
* https://electronics.stackexchange.com/a/239783
* https://stackoverflow.com/questions/43483762/using-stm32-hal-timer-and-adjusting-the-duty-cycle-of-a-pwm-signal
* https://www.waveshare.com/wiki/STM32CubeMX_Tutorial_Series:_PWM
* https://www.youtube.com/watch?v=Ql6klWiROik
*/

#include "stm32f1xx.h"
#include <stdlib.h>

Expand Down
11 changes: 11 additions & 0 deletions projects-sw4stm32/BlinkLED/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# BlinkLED

STM32F103C8T6
Blue Pill Board

Blinking LED on PC13

---

IDE:
- SW4STM32
7 changes: 0 additions & 7 deletions projects-sw4stm32/BlinkLED/src/main.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* Blinking LED on PC13
*/

#include "stm32f1xx.h"

int main(void) {
Expand Down
18 changes: 18 additions & 0 deletions projects-sw4stm32/PushButtonInterrupt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PushButtonInterrupt

STM32F103C8T6
Blue Pill Board

Toggle LED on PC13 with push button on PA0.

PA0 uses external interrupt set up using registers.

---

IDE:
- SW4STM32


## References

- http://www.hertaville.com/external-interrupts-on-the-stm32f0.html
15 changes: 0 additions & 15 deletions projects-sw4stm32/PushButtonInterrupt/src/main.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* Toggle LED on PC13 with
* push button on PA0.
*
* PA0 uses external interrupt
* set up using registers.
*
* References
* - http://www.hertaville.com/external-interrupts-on-the-stm32f0.html
* -
*/

#include "stm32f1xx.h"
#include <stdbool.h>

Expand Down
18 changes: 18 additions & 0 deletions projects-sw4stm32/PushButtonInterrupt_HAL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PushButtonInterrupt_HAL

STM32F103C8T6
Blue Pill Board

Toggle LED on PC13 with push button on PA0.

PA0 uses external interrupt set up using Cube HAL.

---

IDE:
- SW4STM32

## References

- http://www.hertaville.com/external-interrupts-on-the-stm32f0.html
- https://www.simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2007%20-%20GPIO%20Interrupts%20(EXTI)%20using%20HAL%20(and%20FreeRTOS).pdf
16 changes: 0 additions & 16 deletions projects-sw4stm32/PushButtonInterrupt_HAL/src/main.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* Toggle LED on PC13 with
* push button on PA0.
*
* PA0 uses external interrupt
* set up using Cube HAL.
*
* References
* - http://www.hertaville.com/external-interrupts-on-the-stm32f0.html
* - https://www.simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2007%20-%20GPIO%20Interrupts%20(EXTI)%20using%20HAL%20(and%20FreeRTOS).pdf
*
*/

#include "stm32f1xx.h"
#include <stdbool.h>

Expand Down
14 changes: 14 additions & 0 deletions projects-sw4stm32/PushButtonPolling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# PushButtonPolling

STM32F103C8T6
Blue Pill Board

Blinking LED on PC13.

Press and hold push button on PA0
to speed blinking frequency

---

IDE:
- SW4STM32
9 changes: 0 additions & 9 deletions projects-sw4stm32/PushButtonPolling/src/main.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* Blinking LED on PC13.
* Press push button on PA0
* to speed blinking frequency
*/

#include "stm32f1xx.h"

int main(void) {
Expand Down
20 changes: 20 additions & 0 deletions projects-sw4stm32/PushButtonPolling_HAL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PushButtonPolling_HAL

STM32F103C8T6
Blue Pill Board

Blinking LED on PC13.

Press and hold push button on PA0
to speed blinking frequency

Setup using Cube HAL

---

IDE:
- SW4STM32

## References

- https://www.simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2001%20-%20GPIO%20Operations%20using%20HAL%20(and%20FreeRTOS).pdf
15 changes: 0 additions & 15 deletions projects-sw4stm32/PushButtonPolling_HAL/src/main.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* Blinking LED on PC13.
* Press push button on PA0
* to speed blinking frequency
*
* Setup using Cube HAL
*
* References
* - https://www.simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2001%20-%20GPIO%20Operations%20using%20HAL%20(and%20FreeRTOS).pdf
*
*/

#include "stm32f1xx.h"

int main(void) {
Expand Down
25 changes: 25 additions & 0 deletions projects-sw4stm32/SPI-Write/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPI-Write

STM32F103C8T6
Blue Pill Board

SPI using MAX7219 to drive an 8x8 LED matrix
Each pixel is turned on one by one.

---

IDE:
- SW4STM32

## Connections

Label | Pin | Function
--- | --- | ---
CS | PA4 | Software slave select
CLK | PA5 | SPI clock
DIN | PA7 | SPI MOSI
NC | PA6 | SPI MISO

## References

- https://www.simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2001%20-%20GPIO%20Operations%20using%20HAL%20(and%20FreeRTOS).pdf
16 changes: 1 addition & 15 deletions projects-sw4stm32/SPI-Write/src/main.c
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* SPI using MAX7219 to drive an 8x8 LED matrix
* Each pixel is turned on one by one.
*
* Connections:
* CS - PA4 | Software slave select
* CLK - PA5 | SPI clock
* DIN - PA7 | SPI MOSI
* NC - PA6 | SPI MISO
*/

#include "stm32f1xx.h"
#include "stm32f1xx.h"

#define MAX7219_MODE_DECODE 0x0900
#define MAX7219_MODE_INTENSITY 0x0A00
Expand Down
27 changes: 27 additions & 0 deletions projects-sw4stm32/SPI-Write_HAL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# SPI-Write_HAL

STM32F103C8T6
Blue Pill Board

SPI using MAX7219 to drive an 8x8 LED matrix
Each pixel is turned on one by one.

This uses CubeHAL to initialise SPI

---

IDE:
- SW4STM32

## Connections

Label | Pin | Function
--- | --- | ---
CS | PA4 | Software slave select
CLK | PA5 | SPI clock
DIN | PA7 | SPI MOSI
NC | PA6 | SPI MISO

## References

- https://www.simonmartin.ch/resources/stm32/dl/STM32%20Tutorial%2001%20-%20GPIO%20Operations%20using%20HAL%20(and%20FreeRTOS).pdf
16 changes: 0 additions & 16 deletions projects-sw4stm32/SPI-Write_HAL/src/main.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
* SPI using MAX7219 to drive an 8x8 LED matrix
* Each pixel is turned on one by one.
*
* This uses CubeHAL to initialise SPI
*
* Connections:
* CS - PA4 | Software slave select
* CLK - PA5 | SPI clock
* DIN - PA7 | SPI MOSI
* NC - PA6 | SPI MISO
*/

#include "stm32f1xx.h"

#define MAX7219_MODE_DECODE 0x0900
Expand Down
18 changes: 18 additions & 0 deletions projects-sw4stm32/Timer-BlinkLED/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Timer-BlinkLED

STM32F103C8T6
Blue Pill Board

TIM1 is configured as an up-counter and triggers
an interrupt every 500ms to toggle an LED on PC13.

---

IDE:
- SW4STM32

## References

- http://homepage.cem.itesm.mx/carbajal/Microcontrollers/SLIDES/STM32F3%20Timers.pdf
- http://www.keil.com/download/docs/363.asp
- https://www.youtube.com/watch?v=mqA4ELmzCmM
14 changes: 0 additions & 14 deletions projects-sw4stm32/Timer-BlinkLED/src/main.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
/**
* STM32F103C8T6
* Blue Pill Board
*
*
* TIM1 is configured as an up-counter and triggers
* an interrupt every 500ms to toggle an LED on PC13.
*
* References
* - http://homepage.cem.itesm.mx/carbajal/Microcontrollers/SLIDES/STM32F3%20Timers.pdf
* - http://www.keil.com/download/docs/363.asp
* - https://www.youtube.com/watch?v=mqA4ELmzCmM
*/

#include "stm32f1xx.h"

/* Modified from STM32_Init.c */
Expand Down
Loading

0 comments on commit 7c62abf

Please sign in to comment.