+ All Categories
Home > Documents > MP3 player on PC using PIC controller via USB.

MP3 player on PC using PIC controller via USB.

Date post: 12-Jan-2016
Category:
Upload: mei
View: 54 times
Download: 0 times
Share this document with a friend
Description:
MP3 player on PC using PIC controller via USB. Supervisor: Dmitry Sokolik Performed by: Yoav Gershoni Shachar Faigenblat. Project Overview. Playing MP3 files that located in the PC Controlling the song selection using the PIC. Establish a USB based connection for control. - PowerPoint PPT Presentation
17
MP3 player on PC using PIC controller via USB. Supervisor: Dmitry Sokolik Performed by: Yoav Gershoni Shachar Faigenblat
Transcript
Page 1: MP3 player on PC using PIC controller via USB.

MP3 player on PC using PIC controller via USB.

Supervisor:Dmitry Sokolik

Performed by:Yoav GershoniShachar Faigenblat

Page 2: MP3 player on PC using PIC controller via USB.

Project Overview

Playing MP3 files that located in the PC

Controlling the song selection using the PIC.

Establish a USB based connection for control.

Enable friendly user interface (LCD, switches).

Page 3: MP3 player on PC using PIC controller via USB.

Block diagram

PIC board

Page 4: MP3 player on PC using PIC controller via USB.

Project Specification Components:

PIC 18F452 evaluation board. DLP 245.

Power supply: 5v for the evaluation board, PIC and

USB bus. Interfaces:

USB bus between the PIC board and the PC

Page 5: MP3 player on PC using PIC controller via USB.

Software Architecture

PCMain function

COM Port functions

USB Driver and Bus

Page 6: MP3 player on PC using PIC controller via USB.

Software Architecture

PICMain function

DLP Driverfunctions

USB Bus

LCD Driverfunctions

LCD Display

Page 7: MP3 player on PC using PIC controller via USB.

Software Development Tools

PIC: MCC18 compiler on MPLAB IDE.

• PC: Code in C, with Visual Studio

compiler.

USB protocol: USB Inspector.

Page 8: MP3 player on PC using PIC controller via USB.

DLP 245 – USB Device

Provides parallel interface to USB bus.

Easy to handle.

No USB protocol knowledge required.

PC Driver are Virtual COM Port.

Page 9: MP3 player on PC using PIC controller via USB.

DLP 245 – PIC connection

PICDLP 245

Page 10: MP3 player on PC using PIC controller via USB.

DLP 245 – PIC connection

Page 11: MP3 player on PC using PIC controller via USB.

LCD

2x16 Characters. LCD controller provide easy

handling. Parallel bus to LCD controller.

Page 12: MP3 player on PC using PIC controller via USB.

LCD PinoutPin NoNameFunctionDescriptionPIC Port

1D7PowerData MSBRD.0

2D6PowerData RD.1

3D5Contrast Adj.DataRD.2

4D4CommandDataRD.3

5D3CommandDataN.C.

6D2CommandDataN.C.

7D1I/ODataN.C.

8D0I/OData LSB כניסות נתוניםN.C.

9EI/OEnable (Strobe) אפשור RA.1

10R/WI/ORead / Write קריאה או כתיבהRA.2

11RSI/ORegister Selectבחירת אוגר RA.3

Page 13: MP3 player on PC using PIC controller via USB.

LCD BUS Waveform

Since the LCD has only 4 bits the E line has to toggle twice for each Data/command transaction.

Page 14: MP3 player on PC using PIC controller via USB.

LCD CommandsInstruction

RSR

WD

7D

6D

5D

4D

3D

2D

1D

0Description

Execution time**

NOP0000000000No Operation0

Clear Display0000000001Clear display & set address counter to zero1.64mS

Cursor Home000000001xSet adress counter to zero, return shifted display to original

position.DD RAM contents remains unchanged.

1.64mS

Entry Mode Set00000001I/

DS

Set cursor move direction (I/D) and specify automatic display shift (S).1.64mS

Display Control0000001DCBTurn display (D), cursor on/off I, and cursor blinking (B) .40uS

Cursor / Display shift

000001S/

CR/

LxxShift display or move cursor (S/C) and specify direction (R/L).40uS

Function Set00001D

LNFxx

Set interface data width (DL), number of display lines (N) and character font (F).

40uS

Set CGRAM Address

0001CGRAM AddressSet CGRAM address. CGRAM data is sent afterwards.40uS

Set DDRAM Address

001DDRAM AddressSet DDRAM address. DDRAM data is sent afterwards.40uS

Busy Flag & Address

01B

FAddress CounterRead busy flag (BF) and address counter40uS

Write Data10DataWrite data into DDRAM or CGRAM40uS

Read Data11DataRead data from DDRAM or CGRAM40uS

Page 15: MP3 player on PC using PIC controller via USB.

LCD Initialization proccess

It appears that the initialization process of the LCD module isn't strait forward as one would think.

Page 16: MP3 player on PC using PIC controller via USB.

Conclusions Every thing works this time!! Datasheets don’t always have all the

information needed to make things work. (LCD)

HW doesn’t always work as you intended it would (Philips).

The Internet provides a useful knowledge base, with the experience of many skilled people.

Page 17: MP3 player on PC using PIC controller via USB.

Recommended