CH341 USB TO I2C/SPI/EPP
USB to I2C OLED
USB to LCD
USB Input Output
SD CARD
SD FAT32 Player PIC12F1822
W25Q64 Flash Recorder
Picture Frame PIC16F690
Color OLED Picture Frame
SD FAT32 TFT Display
Doorbell with SD/EEPROM
SD Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
Arduino Picture Frame
FREQUENCY COUNTER
Chrome Browser Counter
Arduino LED MAX7219 Counter
LCD Accurate Counter
OLED Accurate Counter
MilliHertz Counter
PIC Counter For Android
MAX7219 LED Counter
WiFi Frequency Counter
Frequency Generator
OLED Counter PIC12F629
Talking Frequency Counter
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Arduino Counter for PC
OLED Arduino Counter
OLED Frequency Counter
TFT 10MHz Counter
PC Counter
LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
OBD2
OBD2 Engine Rev Counter
OBD2 Diagnostic app
OSCILLOSCOPE
Logic Analyzer
PIC12F1822 Scope for PC
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Android Oscilloscope
TFT Oscilloscope
USB Oscilloscope
THERMOMETER
Thermocouple 1023 Deg
Thermometer For Browser
OLED Thermometer PIC12F629
OLED Room Thermostat
TFT Clock and Thermometer
LED Thermometer
USB Thermometer
Serial Thermometer
Serial Thermostat
USB DS18B20 Sensor
TIMER / CLOCK
Real Time Clock DS3231
LED TM1637 Timer
OLED Timer Thermometer
TFT Timer Thermometer
LED Timer
LCD Timer
Clock Thermometer
Talking Clock PIC16F628A
Android Talking Clock
WiFi
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
USB
IO for Chrome Browser
USB 16x2 LCD
USB TFT display BMP
USB Meter
USB Input-Output
USB Input-Output Android
DATA ACQUISITION
Analogue to USB (CH341)
MCP3201 on Serial Port
PC Analog Input (USB-UART)
SERIAL PORT
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to Serial
OTHERS
HC-SR04 Sensor
OLED Amp Meter
PC digital I/O (no coding)
Analogue Signal to LPT
LCD Display on LPT
Water Softener
3.7V to 5V
Solar Charger
PIC Music
Code Lock
SMALL PROJECTS  
  Technical Tips  

COLOR OLED PICTURE FRAME PIC16F1827

The PIC reads bitmap file on the SD card and displays it on the color OLED module. The firmware works for SD and SDHC cards (2-32GB). SD card interface is with SPI1 bus, the OLED interface is SPI2 in PIC16F1827. Each picture is loaded in about 1 second for 8 seconds like a slide show.
OLED Module uses driver SSD1331, 0.95", 96 x 64 pixels. https://www.ebay.co.uk/itm/282379866279?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
Micro SD card is connected via micro SD module.
The Micro SD and SSD1331 modules are powered by 5V, the PIC is powered by 3.8V from the 5V minus 2 diodes drop. It is done because the SSD1331 don't tolarate more than 4V at the inputs. Error LED indicates problem with the SD card. I tested this project with 2GB, 8GB and 32GB SD cards.
TO SET UP THE SD CARD:
Format the card with FAT32.
Resize image file.
Name the files using short names "1.bmp", "2.bmp", etc.
Save the file as 24 bits bmp.
Convert bmp files to 16 bits (5:6:5) using https://online-converting.com/image/convert2bmp/
Add the file to the root folder of the card (don't use a directory).

1331gif 1331

line

ARDUINO SD COLOR OLED PICTURE FRAME

The Arduino reads bitmap file on the SD card and displays it on the color OLED module. The firmware works for SD and SDHC cards (2-32GB). SD card interface is with SPI bus, the OLED interface is USART as SPI in ATMEGA328.
OLED Module uses driver SSD1331, 0.95", 96 x 64 pixels. https://www.ebay.co.uk/itm/282379866279?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
Micro SD card is connected via micro SD module.
TO SET UP THE SD CARD:
Format the card with FAT32.
Resize image file.
Name the files "1.bmp", "2.bmp", etc.
Save the file as 24 bits bmp.
Convert bmp files to 16 bits (5:6:5) using https://online-converting.com/image/convert2bmp/
Add the file to the root folder of the card (don't use a directory).

1331 1331gif

line

ARDUINO SD TFT PICTURE FRAME

The Arduino reads bitmap file on the SD card and displays it on the TFT module. The firmware works for SD and SDHC cards (2-32GB). SD card interface is with SPI bus, the TFT interface is USART as SPI in ATMEGA328.
LCD TFT Module uses driver ST7735, 1.8", 128 x 160 pixels.
SD card can be connected via 1K resistors or using micro SD module.
TO SET UP THE SD CARD:
Format the card with FAT32.
Create image file using MS Paint or another program, file size is 61KB, image size 160 pixels high by 128 pixels wide.
Name the files "1.bmp", "2.bmp", etc.
Save the file as 24 bits bmp.
Add the file to the root folder of the card (don't use a directory).

  

line

SD CARD FAT32 PICTURE FRAME

This project uses PIC16F876A and 320x240 TFT with driver ILI9341. The program displays BMP pictures from the SD/SDHC card formatted FAT32. The code has functions that find the root directory, read the files location from the Root Directory and streams the data to the TFT. The code displays the files in rotation. The software can read only FAT32 and only from the root directory. The file name and size isn't read.
To setup the SD/SDHC card: format the card with FAT32, add files to root folder without directories. Each picture file size is 226KB, image size 320 pixels high by 240 pixels wide, saved as 24 bits bitmap. Files names have to be 8.3 type, 8 characters max. File can be created using MS Paint.

More about FAT32 in this document: https://staff.washington.edu/dittrich/misc/fatgen103.pdf
Good free specifications for SD can be found in SanDisk PDF: http://alumni.cs.ucr.edu/~amitra/sdcard/ProdManualSDCardv1.9.pdf
You are free to use the circuit diagram and software with no limitations.

tft tft

Circuit Description
See also Technical Tips

RD input of 3.3V is taken from the TFT module.
The module supply is 5V. The LCD driver is ILI9341.

line

SD CARD TFT PICTURE FRAME PIC16F1827

The PIC16F1827 reads bitmap files on the SD card and displays it on the TFT module. The firmware works for SD/SDHC cards (2-32GB). SD card interface the PIC with hardware SPI 1 of the PIC, TFT interfaced with SPI 2.
The software reads the files on the SD card and loads each evry 10 seconds, like a slide show. The SD is read one byte at a time and write it to the TFT until 61,494 bytes are read.
The pic firmware can read only bitmap file of 24 bits bmp type. The file has to be size of 160 pixels width and 128 pixels high. The firmware removes the bitmap header (54 bytes) and then streams the rest of the file to the TFT. Every 3 bytes are the 24 bits color for one pixel.
LCD TFT Module uses driver ST7735, 1.8", 128 x 160 pixels.
TO SET UP THE SD CARD:
Format the card with FAT32.
Create image files using MS Paint or another program, file size is 61KB, image size 128 pixels high by 160 pixels wide.
Name the files 1.bmp, 2.bmp etc.
Save the files as 24 bits bmp.
Add the files to the root directory of the card (don't use folders).

pf

line

SD CARD TFT PICTURE FRAME PIC16F690

The PIC16F690 reads bitmap files on the SD card and displays it on the TFT module. The firmware works for SD/SDHC cards (2-32GB). SD card interface the PIC with hardware SPI of the PIC, TFT interfaced with software (bit banging) SPI.
The software reads the files on the SD card and loads each evry 10 seconds, like a slide show. The SD is read one byte at a time and write it to the TFT until 61,494 bytes are read.
The pic firmware can read only bitmap file of 24 bits bmp type. The file has to be size of 160 pixels width and 128 pixels high. The firmware removes the bitmap header (54 bytes) and then streams the rest of the file to the TFT. Every 3 bytes are the 24 bits color for one pixel.
LCD TFT Module uses driver ST7735, 1.8", 128 x 160 pixels.
TO SET UP THE SD CARD:
Format the card with FAT32.
Create image files using MS Paint or another program, file size is 61KB, image size 128 pixels high by 160 pixels wide.
Name the files 1.bmp, 2.bmp etc.
Save the files as 24 bits bmp.
Add the files to the root directory of the card (don't use folders).

pf pf2

Circuit Description
See also Technical Tips

Micro SD Module
http://www.ebay.co.uk/itm/Micro-SD-Card-Reader-SPI-for-Arduino-Raspberry-Pi-UK-Seller-/322502815052?hash=item4b16aa6d4c:g:z9EAAOSwONBZCQQ5

LCD TFT Module uses driver ST7735, 1.8", 128 x 160 pixels.
https://www.ebay.co.uk/itm/141999175585?hash=item210fcf77a1:g:My0AAOSwBLlVZCpN



Name:

Comments and questions

Copy the number from the picture It stops net-robots from adding comments.



31.05.2017 - 03:50
Name: Moty
Comment: Hi Djalltra, Try these 2 websites, http://www.tavi.co.uk/phobos/fat.html https://technet.microsoft.com/en-us/library/cc776720(v=ws.10).aspx It takes a few hours to learn the basics and when you are successful in your code it surprises you how simple FAT is.

30.05.2017 - 04:14
Name: djalltra
Comment: hi 😃 moti I've searched all over the Web for tutorials on fat32 and fat16 file system and it seems like your the best looking at how you write your codes it shows your have a clear understanding about fat/fat32 file system could you please do a tutorial about the topic it would really help a lot because I don't always fancy copy codes but to understand them the links you please really don't help much in understanding the topic thanks

19.11.2015 - 00:07
Name: Moty
Comment: Hi Nichole. fat() follows the rules of FAT32 to find the location of the data on the disk (SD card). The first sector of the disk (MBR) has the info where the tables and the root folder are. When formatting the disk FAT32 selects the sectors for the data depending on the size of the disk. You can study the details and rules of FAT32 by clicking the link on this page. FAT is a simple file system and easy to learn.

18.11.2015 - 17:46
Name: nichole
Comment: hi moty is me nichole please i really want you to throw more light on the (void fat() )

18.11.2015 - 17:42
Name: Nichole
Comment: i love your works

04.09.2015 - 09:18
Name: hseyin
Comment: hi moty. how are u ? 2 will be questions 1) do{WriteSD();}while(!Rec); // for holding down the record button 2) How should automatically stop playback finished?

iconFlag Countermoty22.co.uk  2008-2023