Marcel Mushik Electronic Class Schedule with Wireless Network Access Helsinki Metropolia University of Applied Sciences Bachelo
3 seven inch screen and wide screen capability. The resolution of the unit is high, as the resolution is 800 x 480 or 16:10. The frame itself can
4 2.2 SD Card File System The SD memory card is a flash memory card which was originally designed to be used with audio and video devices as h
5 The first sector, the Master Boot Record (MBR), is reserved and contains the partition table and other vital information concerning how the mem
6 The next critical section of the memory is the root directory. This contains different entries, each 32 bytes long, for each file stored in mem
7 2.3 SD Card Command Format There are two different modes of communication through the data lines of the SD memory card. The usual method use
8 The following four bytes in the command are 0x00. These are called the argument bytes. For a read or write operation the address would be given w
9 The additional commands that are needed to distinguish which kind of card has been inserted can be seen in figure 7.
10 3 Cypress Programmable System on a Chip 3.1 PSoC Overview The Programmable System on a Chip (PSoC) microcontroller is a very flexible ad
11 Figure 8 shows the layout of these analogue and digital blocks and the basic structuring that the designer has to work with.
12 Once the blocks are set and the pin routes have been placed, global settings can be configured. Figure 9 shows the available global settings i
Author(s) Title Number of pages Date Degree Degree programme Specialisation option Instructor(s) Abstract Marcel Mushik Electronic
13 transfer. This is handled within the body of the program code by calling the respective function and giving the required argument. Exploiting
14 The communication can be set up to be full duplex or half duplex. There are also options that can be exercised such as using a parity bit, ch
15 4.3 WiFly WLAN Module The WiFly wireless unit is an off the shelf 802.11 WLAN module made specifically to interface with embedded electron
16 Once the WiFly unit is setup it can be taken out of command mode. Any further system changes can be made via a TCP/IP telnet session, given t
17 parameters of the oscillator circuit which change the speed at which the circuit oscillates. The oscillation comes from what is known as a Ca
18 The pads are then milled out of circuit board material and connected accordingly to the circuit. This can then be hidden behind glass or thin
19 5 Microcontroller Environment of the Electronic Class Schedule 5.1 Functional Division of Microcontrollers In this project two types of
20 The system has been designed to have several sections of the unit function in a specific order. Every time the electronic class schedule is u
21 that the picture frame may access the file on the SD card. The picture is shown for a specified amount of time after which the Control MCU wil
22 5.2 Design of Capacitive Touch User Interface The capacitive touch sense interface was designed for use with the CY8C21534-24PVXI PSoC MCU
Preface I would like to thank Antti Piironen and Anssi Ikonen for grabbing me in the hallway and proposing this project to me. This project has be
23 5.3 Interfacing WLAN Module The interfacing of the WiFly module involved both hardware and software configuration. An external antenna was
24 sending commands for delivery to the NFS. Dynamic Host Configuration Protocol (DHCP) was turned on so that the unit would automatically get a
25 WiFly and buffered as it is sent out of the UART connection. The MCU is programmed to enter this raw data directly to the SD card in 512 byte
26 MISO, MOSI, SCLK, and SS were not taken directly from the SD card to the MCU as shown in the figure but rather switched through the HEF4066 b
27 Within the software of the MCU there are two arrays that are used in the writing of data to the SD card. The first is the FAT entry and the s
28 As the raw data starts to come in from the wireless unit, a continuous write command is first issued to the SD card, and data is written dire
29 continuous write command, the host device must fill the remaining space of the last sector with dummy bytes of the hex value 0x00 and then sen
30 6 Client-Server Functionality of the Electronic Class Schedule 6.1 Schedule File Server Overview The schedule file server program was de
31 The application was kept basic as the only function at that point in time was to listen out for file requests and send the files. Figure 22 sh
32 the school’s website and parsing information for that particular classroom. It then uses this data to create a text file version of the sched
Table of Contents Abstract Table of Contents List of Figures List of Abbreviations 1 Introduction 2 Digital Photo Frame and Memory Type
33 representing the letter S as a start byte, signifying that it is ready for the raw data. Once the start byte is received the server program the
34 7 Discussion 7.1 Implementation Issues During this project there were several issues that needed to be overcome, which did not have simpl
35 implemented to show outputs on the LCD. A separate SPI connection was programmed into the Communications MCU and output to the temporary MCU w
36 signals would not pass. This assumption proved to be wrong as it would still degrade the signal existing in the other switching device. With
37 Another area of development involving speed is seeing if the Bus mode of the SD card can be used with the PSoC MCU. Research into using the B
38 The last area of development is the server program. This program could be developed further to show all files that have been parsed and turne
39 8 Conclusions The goal of developing a low priced system that could retrieve class schedules over the wireless network and present them on
40 References 1. HxD hex editor [computer program]. Version 1.7.7.0. Saarbrücken, Germany: mh- nexus; April 3, 2009. 2. Grover James. SD ca
41 12. Cypress Semiconductor Corporation. Capsense layout guidelines [online]. San Jose, California, USA: Cypress Semiconductor Corporation. UR
42 23. Horowitz Paul, Hill Winfield. The art of electronics, second edition. Cambridge Massachusetts: Cambridge University Press; 2009. 24. Mi
8 Conclusions References Appendix 1: Microcontroller Specifications Appendix 2: Program Code Appendix 3: List of Electrical Components Appen
Appendix 1 1(1) Microcontroller Specifications CY8C21534 Cypress - Clock 24 MHz - Operating voltage 2.4 V to 5.25 V - Operating temperatur
Program Code - Communication MCU Program //------------------------------------------------------------- // Metropolia University of Applied S
Appendix 2 2(15) } else if ((PRT2DR & 0x40) == 0x40) { decision = 4; button_press(); } else if ((PRT0DR & 0x01) == 0x01) { decision =
Appendix 2 3(15) SD_pwr_Switch(1); // Turns on digital photo frame Timer8_Start(); } // Function description-------------------------------
Program Code - Communication MCU Program //------------------------------------------------------------- // Metropolia University of Applied S
Appendix 2 5(15) Write_enable_Start(); Loading_LED_Start(); Counter8_WritePeriod(0x60); Counter8_WriteCompareValue(0x30); Counter8_Start(); U
Appendix 2 6(15) while(UART_cReadChar() == 0x00); // Scans for valid data data_size[0] = UART_bReadRxData(); // Stores Lowest byte of // fi
Appendix 2 7(15) write_data_init(0x00, 0x04, 0x00, 0x00); // Writes raw data start_token(); // Address sector 512, offset 40000 Counter8_W
Appendix 2 8(15) // Function description---------------------------------------- // Initializes SD card for SPI communications void card_initia
Appendix 2 9(15) SPIM_SendTxData(0x00); // set message to transmit while(!(SPIM_bReadStatus() & SPIM_SPIM_SPI_COMPLETE)){}; SPIM_SendTxData
List of Figures Figure 1: Figure 2: Figure 3: Figure 4: Figure 5: Figure 6 Figure 7: Figure 8: Figure 9: Figure 10: Figure 11:
Appendix 2 10(15) // Function description---------------------------------------- // Start token for continuous write command. void start_token(
Appendix 2 11(15) while(!(SPIM_bReadStatus() & SPIM_SPIM_SPI_COMPLETE)){}; Rdata = SPIM_bReadRxData(); for(i=0; i < 100; i++) { SPIM_S
Program Code – File Server Program //------------------------------------------------------------ // Metropolia University of Applied Sciences
Appendix 2 13(15) // Start listening server.Start(); // Displays information to listBox for user listBox1.Items.Add("Local IP address:&qu
Appendix 2 14(15) // Adds file type to file name file += ".jpg"; // Opens file access stream FileStream data = new FileStream(file,
Appendix 2 15(15) { // Program is stopped if an exception is present server.Stop(); RunServer(); } } while(message != "QUIT1"); }
List of Electrical Components (1) Digital photo frame (1) WiFly WLAN module (1) CY8C21534 PSoC mictrocontroller (1) CY8C29466 PSoC mictroco
Appendix 4 1(3) Appendix 4: Circuit Board Diagrams
Appendix 4 2(3)
AAppendix 4 3(3)
List of Abbreviations ADC - Analogue to Digital Converter bps - Bits Per Second CRC - Cyclic Redundancy Check CSR - Capacitive Sensor Re
1 1 Introduction The goal of this project was to design a system that would retrieve class schedules over a Wireless Area Local Network (WLAN)
2 requested file, and the MCU system will write that file to a Secure Digital Memory (SD) card that is shared by the digital photo frame. The dig
Comentários a estes Manuais