1 / 15

OptiFlex

OptiFlex. Asad Chaudhry Guthrey Coy Brandonn Gorman. Review of Project Objectives/Goals. Develop a “self-aware” fiber optic mesh that is conscious of its current state (temperature, shape, strain, etc.) by using Bragg graded fiber Display the data on a monitor. FBG. Block Diagram.

alcina
Download Presentation

OptiFlex

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OptiFlex Asad Chaudhry Guthrey Coy Brandonn Gorman

  2. Review of Project Objectives/Goals • Develop a “self-aware” fiber optic mesh that is conscious of its current state (temperature, shape, strain, etc.) by using Bragg graded fiber • Display the data on a monitor

  3. FBG

  4. Block Diagram Optical Processing I/O

  5. Functional Decomposition

  6. Functional Decomposition

  7. External A/D Converter Circuit

  8. Components/Budget

  9. Schedule

  10. Division of Labor

  11. FPGA Block Diagram

  12. Completed Code void lcd_init( void) { usleep(15000); /* Wait for more than 15 ms before init */ /* Set function code four times -- 8-bit, 2 line, 5x7 mode */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x38); usleep(4100); /* Wait for more than 4.1 ms */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x38); usleep(100); /* Wait for more than 100 us */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x38); usleep(5000); /* Wait for more than 100 us */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x38); usleep(100); /* Wait for more than 100 us */ /* Set Display to OFF*/ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x08); usleep(100); /* Set Display to ON */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x0C); usleep(100); /* Set Entry Mode -- Cursor increment, display doesn't shift */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x06); usleep(100); /* Set the Cursor to the home position */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x02); usleep(2000); /* Display clear */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x01); usleep(2000); } char convert_int_to_char(int x) { if (x >= 0 && x <= 9) return (x + '0'); else { convert_int_to_char(x/10); return (x%10 + '0'); } } #include "system.h" #include "sys/alt_irq.h" #include "altera_avalon_pio_regs.h" #include "altera_avalon_timer_regs.h" #include <stdlib.h> #include <unistd.h> //e.g. //usleep(5000000); is 5 seconds #include <stdio.h> #include <io.h> #include <altera_avalon_uart_regs.h> #include "priv/alt_busy_sleep.h" #include "altera_avalon_lcd_16207_regs.h" #define LCD_WR_COMMAND_REG 0 #define LCD_RD_STATUS_REG 1 #define LCD_WR_DATA_REG 2 #define LCD_RD_DATA_REG 3 void lcd_disp ( char k[], inti, char g[], int u){ int j; /* Set the Cursor to the home position */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x02); usleep(2000); /* Display clear */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x01); usleep(2000); for(j = 0; j < i; j++){ IOWR(LCD_0_BASE, LCD_WR_DATA_REG,k[j]); usleep(100); } /* Set the cursor to the second line * * */ for(j = 0; j < u; j++){ IOWR(LCD_0_BASE, LCD_WR_DATA_REG,g[j]); usleep(100); } }

  13. Completed Code alt_u32 clear_lcd(void) { /* Set the Cursor to the home position */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x02); usleep(2000); /* Display clear */ IOWR(LCD_0_BASE, LCD_WR_COMMAND_REG, 0x01); usleep(2000); return(0); } void led_disp(char led_val){ IOWR_ALTERA_AVALON_PIO_DATA(RED_LEDS_BASE, (led_val & 0xFF)); } void adc_handler(intadc_data[]){ int count = 0,i,j; for(i=0; i < 3; i++){ IOWR_ALTERA_AVALON_PIO_DATA(ADC_SEL1_BASE,i); for(j=0; j < 7; j++){ IOWR_ALTERA_AVALON_PIO_DATA(MUX_SEL1_BASE,j); IOWR_ALTERA_AVALON_PIO_DATA(CS1_BASE,0); IOWR_ALTERA_AVALON_PIO_DATA(WR1_BASE,0); //might need usleep() here to wait for BUSY to go low while(BUSY1_BASE != 1) usleep(100); IOWR_ALTERA_AVALON_PIO_DATA(WR1_BASE,1); IOWR_ALTERA_AVALON_PIO_DATA(RD1_BASE,0); adc_data[count] = DATA1_BASE; IOWR_ALTERA_AVALON_PIO_DATA(CS1_BASE,1); IOWR_ALTERA_AVALON_PIO_DATA(RD1_BASE,1); count++; } } }

  14. Planned Deliverables Milestone 1 • Working ADC • Completed interfacing code Milestone 2 • Working single fiber sensor • Temperature and Pressure module completed • Mesh completely assembled

  15. Any Questions?

More Related