Download presentation
Presentation is loading. Please wait.
1
SDK&UI&LCM&FM Presentation 報告人 : 侯欽堅
2
2 Page Excel Your Idea to Silicon Outline SDK Structure & Code Flow LCM SPEC & Hardware LCM Code FM SPEC & Hardware FM Code UI Hardware UI Code API Structure & Code Flow
3
3 Page Excel Your Idea to Silicon SDK Structure & Code Flow SDK : Software Development Kit User’s Development : Song, UI, LCM, FM Module, Lyrics… \RAM_user\example2\Lcd_controller2.c, funentry.c, i2c.c, song.c, fm_tea5767.c, gpio.c, lrc_parser.c 與 Kernel 的連接方式 : a. Customize Function Entry: api_bCustomizeFunEntry() b. APIs
4
4 Page Excel Your Idea to Silicon api_bCustomizeFunEntry() To process the event from the Kernel A. EVENT_QUARTER_SECOND: LCM Display, Timer B. EVENT_LOOP_EPILOG : Song events, Key process C. EVENT_USB_STATUS_CHANGE : USB Status show D. USB_CABLE_IN : Cable in process E. USB_CABLE_OUT : Cable out process F. SYS_INIT_PROLOG : LCD & Radio initial G. SYS_INIT_EPILOG : GUI & Song & Display initial
5
5 Page Excel Your Idea to Silicon Example Code Flow 1.funentry.c : api_bCustomizeFunEntry() 2.Lcd_controller2.c : LCM Basic process 3.i2c.c : I2C Driver 4.fm_tea5767.c : FM Driver 5.gpio.c : Button basic process 6.song.c : LCD Display, UI flow control 7.lrc_parser.c : Lyrics show
6
6 Page Excel Your Idea to Silicon LCM SPEC NT7502 65x132 RAM-Map LCD Controller..... vLcdSetAddrX(0) vLcdSetAddrX(3) vLcdSetAddrY(0)vLcdSetAddrY(95) 32 pixels 96 pixels bit0 bit7 vWriteLCDData()
7
7 Page Excel Your Idea to Silicon Pin define
8
8 Page Excel Your Idea to Silicon Command support 0xE2 0xA2 0xA0 0xC0 0x23 0x81 0x03 0x2C 0x2E 0x2F 0xE0 0x4X 0xAF 0xBX 0x1X 0x0X ER/w
9
9 Page Excel Your Idea to Silicon LCM Hardware
10
10 Page Excel Your Idea to Silicon LCM Code vWriteLCDCommand() write command to LCD controller vWriteLCDData() write data to LCD controller u8ReadLCDStatus() read the status of LCD controller vLcdInit() do LCD initiation vLCDSetBrightness() set the V0 output voltage electronic volume register vLcdSetAddrX() set page address vLcdSetAddrY() set column address vLcdClearLine() clear a page-line vLcdClearDisplay() clear screen vLcdPut8x8Char() put a 8x8 bitmap on the screen vLcdPut16x16Char() put a 16x16 bitmap on the screen vLcdOutString() put a specific string on the screen..... vLcdSetAddrX(0) vLcdSetAddrX(3) vLcdSetAddrY(0)vLcdSetAddrY(95) 32 pixels 96 pixels bit0 bit7 vWriteLCDData() back
11
11 Page Excel Your Idea to Silicon FM SPEC & Hardware I 2 C Protocol FM Register
12
12 Page Excel Your Idea to Silicon I 2 C Protocol SDA : Serial Data line SCL : Serial Clock line Every device has its own unique address Start Stop Send BYTE Receive BYTE
13
13 Page Excel Your Idea to Silicon I2C : Start & Stop
14
14 Page Excel Your Idea to Silicon I2C : Send BYTE Once the start condition has been sent, a byte can be transmitted by the MASTER to the SLAVE. This first byte after a start condition will identify the slave on the bus (address) and will select the mode of operation. ACK
15
15 Page Excel Your Idea to Silicon I2C : Receive BYTE All the master has to do is generate a rising edge on the SCL line (2), read the level on SDA (3) and generate a falling edge on the SCL line (4). The slave will not change the data during the time that SCL is high.
16
16 Page Excel Your Idea to Silicon FM SPEC
17
17 Page Excel Your Idea to Silicon FM SPEC 0x80, 0x00, 0x00, 0x40, 0x00
18
18 Page Excel Your Idea to Silicon FM SPEC
19
19 Page Excel Your Idea to Silicon FM SPEC
20
20 Page Excel Your Idea to Silicon FM SPEC
21
21 Page Excel Your Idea to Silicon FM Hardware
22
22 Page Excel Your Idea to Silicon FM Code bRadioInit() initiation bSetFmFrequency() set the specific frequency bFmFrequencyUp() increase 0.1 MHz bFmFrequencyDown() decrease 0.1 MHz bFmAutoSearch() up/down to search radio station auto bRadioStop() stop the radio
23
23 Page Excel Your Idea to Silicon UI Hardware (1) 128Pin (2)100Pin
24
24 Page Excel Your Idea to Silicon UI Code -- Button
25
25 Page Excel Your Idea to Silicon UI Code -- Button
26
26 Page Excel Your Idea to Silicon UI Code -- bGui_xxx()
27
27 Page Excel Your Idea to Silicon UI Code -- GUI
28
28 Page Excel Your Idea to Silicon UI Code -- vLcd_xxx() vLcd_Disp_AllLvl(void)Show All LCM Display void vLcd_Part_Lvl0(void) Show Line 1 include : Menu mode, Repeat mode, EQ mode, Battery Remain vLcd_Disp_RepeatMode()Repeat mode Display vLcd_Disp_EqualizerMode()EQ mode Display vLcd_Disp_Battery()Get Remain Battery & Display vLcd_Disp_Exception(void)Show Error Message to LCM vLcd_Disp_FMfreq(INT8U* sz)FM Frequency Display void vLcd_Disp_showMode(void)Show Repeat and EQ mode select vLcd_Disp_Volume(void)Volume Display void vLcd_FileName()Filename Display vLcd_Part_Icon(INT8U u8icon)Show ICON like PLA,STOP,PAUSE… vLcd_PConLine(void)Show PC connect vLcd_SongTimeOn(SONG_TIME_TYPE etime) Show Playing Time vLcd_PlayTimeUpdate(void)Playing Time Update vLcd_SongName()Show Title&Artist&Album or Song name vLcd_ScollDataUpdate(void)Update Display Scroll Data
29
29 Page Excel Your Idea to Silicon API Structure RAM CODE DSP Mailbox driver Font Manager Playback control Format/Directory Manager (\RAM_kernel\*.*) ram_api() 0x800 0 0x9000 0xFFFF CODE(?PR?*?ramapi (0x9000)) LCD driver FM driver GUI control (\RAM_user\*.*) SDK APIs API.c
30
30 Page Excel Your Idea to Silicon API Code
31
31 Page Excel Your Idea to Silicon API Code
32
32 Page Excel Your Idea to Silicon API Code
33
33 Page Excel Your Idea to Silicon End~~
34
34 Page Excel Your Idea to Silicon 0xC0, 0x80, 0x00, 0x00, 0x40, 0x00 B
35
35 Page Excel Your Idea to Silicon 0x00, B
36
36 Page Excel Your Idea to Silicon B
37
37 Page Excel Your Idea to Silicon B
38
38 Page Excel Your Idea to Silicon back b
39
39 Page Excel Your Idea to Silicon back
40
40 Page Excel Your Idea to Silicon back b
41
41 Page Excel Your Idea to Silicon back
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.