Download presentation
Presentation is loading. Please wait.
1
MP3 player on PC using PIC controller via USB. Supervisor: Dmitry Sokolik Performed by: Yoav Gershoni Shachar Faigenblat
2
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).
3
Block diagram PIC board
4
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
5
Software Architecture PC Main function COM Port functions USB Driver and Bus
6
Software Architecture PIC Main function DLP Driver functions USB Bus LCD Driver functions LCD Display
7
Software Development Tools PIC: MCC18 compiler on MPLAB IDE. PC: Code in C, with Visual Studio compiler. USB protocol: USB Inspector.
8
DLP 245 – USB Device Provides parallel interface to USB bus. Easy to handle. No USB protocol knowledge required. PC Driver are Virtual COM Port.
9
DLP 245 – PIC connection PIC DLP 245
10
DLP 245 – PIC connection
11
LCD 2x16 Characters. LCD controller provide easy handling. Parallel bus to LCD controller.
12
LCD Pinout PIC Port DescriptionFunctionNamePin No RD.0 Data MSBPowerD71 RD.1 DataPowerD62 RD.2 DataContrast Adj.D53 RD.3 DataCommandD44 N.C. DataCommandD35 N.C. DataCommandD26 N.C. DataI/OD17 N.C. Data LSB כניסות נתוניםI/OD08 RA.1 Enable (Strobe) אפשורI/OE9 RA.2 Read / Write קריאה או כתיבהI/OR/W10 RA.3 Register Selectבחירת אוגרI/ORS11
13
LCD BUS Waveform Since the LCD has only 4 bits the E line has to toggle twice for each Data/command transaction.
14
LCD Commands Execution time** Description D0D0 D1D1 D2D2 D3D3 D4D4 D5D5 D6D6 D7D7 RWRW RSRS Instruction 0 No Operation 0000000000NOP 1.64mS Clear display & set address counter to zero 1000000000Clear Display 1.64mS Set adress counter to zero, return shifted display to original position. DD RAM contents remains unchanged. x100000000Cursor Home 1.64mS Set cursor move direction (I/D) and specify automatic display shift (S). S I/ D 10000000Entry Mode Set 40uS Turn display (D), cursor on/off I, and cursor blinking (B). BCD1000000Display Control 40uS Shift display or move cursor (S/C) and specify direction (R/L). xx R/ L S/ C 100000 Cursor / Display shift 40uS Set interface data width (DL), number of display lines (N) and character font (F). xxFN DLDL 10000Function Set 40uS Set CGRAM address. CGRAM data is sent afterwards. CGRAM Address1000 Set CGRAM Address 40uS Set DDRAM address. DDRAM data is sent afterwards. DDRAM Address100 Set DDRAM Address 40uS Read busy flag (BF) and address counter Address Counter BFBF 10 Busy Flag & Address 40uS Write data into DDRAM or CGRAM Data01Write Data 40uS Read data from DDRAM or CGRAM Data11Read Data
15
LCD Initialization proccess It appears that the initialization process of the LCD module isn't strait forward as one would think.
16
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.