Presentation is loading. Please wait.

Presentation is loading. Please wait.

Performed by: Lior Raviv & Zohar koritzki Instructor: Reuven Nisar הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל Technion - Israel institute of technology.

Similar presentations


Presentation on theme: "Performed by: Lior Raviv & Zohar koritzki Instructor: Reuven Nisar הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל Technion - Israel institute of technology."— Presentation transcript:

1 Performed by: Lior Raviv & Zohar koritzki Instructor: Reuven Nisar הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל Technion - Israel institute of technology department of Electrical Engineering Final presentation 2d barcode reader

2 Abstract People with vision defects are using a brail script in order to get written information. People with vision defects are using a brail script in order to get written information. Due to technological developments, they will be able to use a mobile optical scanner and a barcode symbol in order to get that information. Due to technological developments, they will be able to use a mobile optical scanner and a barcode symbol in order to get that information. The optical scanner will read a bar-code stamp that contains up to 3000 bytes of data on a small area. The optical scanner will read a bar-code stamp that contains up to 3000 bytes of data on a small area. This project’s aim is to add an interface to the optical scanner. This interface will transform the data read from the bar-code stamp to voice data in Hebrew. This project’s aim is to add an interface to the optical scanner. This interface will transform the data read from the bar-code stamp to voice data in Hebrew. המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory

3 System description The system is consists of three parts: optical bar-code reader, DSP unit and the speakers. The system is consists of three parts: optical bar-code reader, DSP unit and the speakers. Our project is dealing with the DSP unit that has a serial data input from the optical scanner and a data output port for voice data to the speakers. Our project is dealing with the DSP unit that has a serial data input from the optical scanner and a data output port for voice data to the speakers. The data transfer algorithm implemented on the DSP hardware and include voice data files that are saved on an external memory bank. The data transfer algorithm implemented on the DSP hardware and include voice data files that are saved on an external memory bank. The voice data files are transferred to the speakers thru codec by a DMA controller. The voice data files are transferred to the speakers thru codec by a DMA controller. המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory

4 System Block Diagram המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory 2-D Barcode scanner Digital Processing + Transforming To Voice data Output Speakers

5 System operation diagram Scan button pushed Transferring voice files from flash And processing them scanning Translating data into voice syllables Out buffering voice files thru codec Transferring scanned Data into buffer in memory

6 Receiving data from scanner BAR- CODE SCANNER UART BUFFER Data is transformed throw RS232 to the uart.from the uart the data is transformed to buffer in main memory (the string buffer). is transformed to buffer in main memory (the string buffer). Uart is controlled by changing uart registers values

7 Dsp-scanner communication Both dsp and and scanner send data to each other thru the uart.the dsp send commands (scan) and ack\nck after receiving a package.while scanner send data and ack\nck after receiving scan command.a package can contain up to Both dsp and and scanner send data to each other thru the uart.the dsp send commands (scan) and ack\nck after receiving a package.while scanner send data and ack\nck after receiving scan command.a package can contain up to 257 bytes (including headers) The package format: LengthOpcode Message source StatusDataChecksum * The command format is similar excluding data field

8 Translating data into voice syllables 1) Detecting syllable in the scanned string. 2) A voice data file is kept in flash memory for each syllable. 3) File location (starting address) and length kept in searching table.

9 The Searching table The searching table is implemented by array of structures The searching table is implemented by array of structures the structure format: the structure format: 1. Syllable characters. 2. Syllable address (file in flash memory) 3. File length

10 Data flow-flash into main memory buffer1 buffer2 Flash DMA Main memory Data is transferred to the buffers in ping pong method by the DMA, to allow continues data out buffering (thru the codec) to allow continues data out buffering (thru the codec) and data processing in the buffer and data processing in the buffer

11 Dma operation each dma channel is operated by changing its registers.the dma triggers interrupt after a block (file) was sent to synchronies the data flow in the program * opposite to the dsp 23 bit address length * opposite to the dsp 23 bit address length (word access) the dma work with 24 bit address (byte access)

12 Data processing multiplying data by gain (user define) in the data buffers multiplying data by gain (user define) in the data buffers Syllables overlap Syllables overlap

13 Syllables overlap 1) 1) Disassemble each syllable to three parts 2) 2) Reassemble two attached syllables by changing the relevant parts (end of first,start of second) gain Gain 1 Gain 2 for(i=0;i<100;i++){add1[(int)i]=(add1[(int)i]*((99-i)/99)+add2[(int)i]*(i/99)

14 Data flow –main memory to codec file1 file2 DMA CODECspeaker

15 User interface Scan button (new scan request) Scan button (new scan request) Replay button (replay scanned data) Replay button (replay scanned data) The scanned data will be kept in an array The scanned data will be kept in an array Until new scan or instrument turned off Until new scan or instrument turned off Volume buttons(up and down) Volume buttons(up and down)

16 interrupts Each dma channel triggers interrupt Each dma channel triggers interrupt all channels except uart channel triggers at end of block (file).the uart channel trigger a interrupt after each byte is received

17 Program flow Transfer voice file from flash Merge two syllables Send to codec Wait state Identify syllable EOS initialization

18 functions init-initialize all variables and devices the init-initialize all variables and devices the software use. merge-merge between two syllables merge-merge between two syllables gain_mul-multiply syllable by gain (user define) gain_mul-multiply syllable by gain (user define) wait-stay in wait state until scan\replay buttons pushed wait-stay in wait state until scan\replay buttons pushed find-performs search in the syllable search table and activate dma flash channel to transfer voice file find-performs search in the syllable search table and activate dma flash channel to transfer voice file reply_uart-performs checksum and send ack\nck after receiving package from the scanner,replace headers with blanks (to allow correct data translation into syllables) reply_uart-performs checksum and send ack\nck after receiving package from the scanner,replace headers with blanks (to allow correct data translation into syllables)

19 Functions (2) skip_blanks-skip blanks in the scanned string (during skip_blanks-skip blanks in the scanned string (during data translation into syllables) send_scan-send scan command to the scanner,receive ack\nck from the scanner (called from init function) send_scan-send scan command to the scanner,receive ack\nck from the scanner (called from init function) chk_dip-check dip switches chk_dip-check dip switches flip_buffer-flip source buffer for out buffering thru the codec (ping pong) flip_buffer-flip source buffer for out buffering thru the codec (ping pong) lsb-convert address to 24 bit (for the dma),and cut 16 lower bits (two version long int and pointers (lsbp)) lsb-convert address to 24 bit (for the dma),and cut 16 lower bits (two version long int and pointers (lsbp)) msb-convert address to 24 bit (for the dma),and cut 8 higher bits (two version long int and pointers (msbp)) msb-convert address to 24 bit (for the dma),and cut 8 higher bits (two version long int and pointers (msbp))

20 Problems during work Incomplete and inaccurate documentation Incomplete and inaccurate documentation Processor switch during work Processor switch during work Dma send just 53 bytes Dma send just 53 bytes Interrupts collusion Interrupts collusion Problems cant be solved in “logical” way Problems cant be solved in “logical” way


Download ppt "Performed by: Lior Raviv & Zohar koritzki Instructor: Reuven Nisar הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל Technion - Israel institute of technology."

Similar presentations


Ads by Google