Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mini Control System Final Presentation Performed By: Yaron Adler Supervised By: Boaz Mizrachi.

Similar presentations


Presentation on theme: "Mini Control System Final Presentation Performed By: Yaron Adler Supervised By: Boaz Mizrachi."— Presentation transcript:

1 Mini Control System Final Presentation Performed By: Yaron Adler Supervised By: Boaz Mizrachi

2 The Previous Project Multi-Sensors Personal Digital Assistant (PDA) By: Aviv Rosenberg & Ben-Ami Zilber By: Aviv Rosenberg & Ben-Ami Zilber

3 Project Goals Implementing a driver for the RTC unit. Implementing a driver for the RTC unit. Implementing a driver for the Graphic LCD unit. Implementing a driver for the Graphic LCD unit. Implementing a driver for the keyboard. Implementing a driver for the keyboard. Choosing a file system architecture for the MicroSD card, and implementing a driver for the MicroSD card reader. Choosing a file system architecture for the MicroSD card, and implementing a driver for the MicroSD card reader. Implementing a MSD interface for The USB unit. Implementing a MSD interface for The USB unit. Implementing a status line in the device. Implementing a status line in the device. Writing sample applications that use the above components. Writing sample applications that use the above components.

4 MPLAB Project Structure PDACommonBSPFS USB Stack HALAPP

5 MPLAB Project Structure PDACommonSallocCompiler.hGenericTypeDefs.hBSPFS USB Stack HALAPP Common Common files for the rest of the project. Common files for the rest of the project.

6 MPLAB Project Structure PDA CommonBSP A2DI2CSD-SPIPicHardwareProfile.h FS USB Stack HALAPP Board Support Package Lowest layer of the code. Lowest layer of the code.

7 MPLAB Project Structure PDACommonBSPFSFSIOFSconfig.hFSDefs.h USB Stack HALAPP File System Microchip’s FAT16 implementation. Microchip’s FAT16 implementation.

8 MPLAB Project Structure PDA CommonBSPFS USB Stack usb_deviceusb_function_msdusb_descriptors.cusb.husb_ch9.husb_common.husb_config.husb_hal.husb_hal_pic18.h HALAPP USB Stack Microchip’s USB code files. Microchip’s USB code files.

9 MPLAB Project Structure PDA CommonBSPFS USB Stack HAL Timer0RTCGLCDKeyboardStatusLineFSUSBCustom APP Hardware Abstraction Layer All the units drivers of the project. All the units drivers of the project.

10 MPLAB Project Structure PDA CommonBSPFS USB Stack HALAPP MenuMSDBDay Application Layer Applications that use the units drivers. Applications that use the units drivers.

11 RTC Data structures : Data structures : Weekday: enum of the week days. Weekday: enum of the week days. Time: a struct that contains the hour, minute and second. Time: a struct that contains the hour, minute and second. Date: a struct that contains the year, month and day. Date: a struct that contains the year, month and day. TimeAndDate: contains Time, Date and Weekday. TimeAndDate: contains Time, Date and Weekday. Functions: Functions: RTC_initNeeded( ) RTC_initNeeded( ) RTC_init( ) RTC_init( ) RTC_getTime( ) RTC_getTime( ) Numbers in binary mode. Numbers in binary mode.

12 GLCD Supports Hebrew, English, numbers and signs. Supports Hebrew, English, numbers and signs. Supports writing right-to-left and left-to-right. Supports writing right-to-left and left-to-right. Two ways to represent coordinates: pixels and chars. Two ways to represent coordinates: pixels and chars. Easy-to-use constants. Easy-to-use constants. GLCD_FIRST_XPOS GLCD_FIRST_XPOS GLCD_LAST_LINE_INDEX GLCD_LAST_LINE_INDEX GLCD_MAX_CHARS_IN_LINE GLCD_MAX_CHARS_IN_LINE Etc. Etc.

13 GLCD Supports Hebrew, English, numbers and signs. Supports Hebrew, English, numbers and signs. Supports writing right-to-left and left-to-right. Supports writing right-to-left and left-to-right. Two ways to represent coordinates: pixels and chars. Two ways to represent coordinates: pixels and chars. Easy-to-use constants. Easy-to-use constants. Main Functions: Main Functions: GLCD_clearDataRam( ) GLCD_clearDataRam( ) GLCD_goToXY( ) / GLCD_goToCharAndLineIndex( ) GLCD_goToXY( ) / GLCD_goToCharAndLineIndex( ) GLCD_setDiretion( ) GLCD_setDiretion( ) GLCD_putChar( ) / GLCD_putSpecialChar( ) GLCD_putChar( ) / GLCD_putSpecialChar( ) GLCD_printConstString( ) / GLCD_printVarString( ) GLCD_printConstString( ) / GLCD_printVarString( ) GLCD_printDouble( ) / GLCD_printInt( ) GLCD_printDouble( ) / GLCD_printInt( )

14 Keyboard Similar to a cellular phone keypad. Similar to a cellular phone keypad. Uses timer0. Uses timer0. Two sequential presses on the same button within a minute is considered the next character. Two sequential presses on the same button within a minute is considered the next character. Easy Constants. Easy Constants. DEBOUNCE_LIM DEBOUNCE_LIM KEYBOARD_UP KEYBOARD_UP KEYBOARD_HEBREW_LETTERS KEYBOARD_HEBREW_LETTERS Etc. Etc.

15 Keyboard Similar to a cellular phone keypad. Similar to a cellular phone keypad. Uses timer0. Uses timer0. Two sequential presses on the same button within a minute is considered the next character. Two sequential presses on the same button within a minute is considered the next character. Easy Constants. Easy Constants. Main functions: Main functions: Keyboard_nonBlockingGetKey( ) Keyboard_nonBlockingGetKey( ) Keyboard_blockingGetKey( ) Keyboard_blockingGetKey( ) Keyboard_getString( ) Keyboard_getString( )

16 Status Line Informs the user about the battery voltage status and the current type of keyboard keys. Informs the user about the battery voltage status and the current type of keyboard keys. Uses timer interrupt and clear-screens to refresh. Uses timer interrupt and clear-screens to refresh.

17 File System Chosen File System: FAT16. Supported also by PC. Chosen File System: FAT16. Supported also by PC. Implementation by Microchip Solutions. Implementation by Microchip Solutions. The driver is similar to I/O functions in C. The driver is similar to I/O functions in C. Suitable for card sizes up to 2GB. Suitable for card sizes up to 2GB. Contains macros to enable / disable functions. Contains macros to enable / disable functions. Currently, only reads, writes and pgm-functions are enabled. Currently, only reads, writes and pgm-functions are enabled.

18 File System Chosen File System: FAT16. Supported also by PC. Chosen File System: FAT16. Supported also by PC. Implementation by Microchip Solutions. Implementation by Microchip Solutions. The driver is similar to I/O functions in C. The driver is similar to I/O functions in C. Suitable for card sizes up to 2GB. Suitable for card sizes up to 2GB. Contains macros to enable / disable functions. Contains macros to enable / disable functions. Sample functions: Sample functions: FS_fopen( ) / FS_fopenpgm( ) FS_fopen( ) / FS_fopenpgm( ) FS_FindFirst( ) / FS_FindFirstpgm( ) FS_FindFirst( ) / FS_FindFirstpgm( ) FS_remove( ) / FS_removepgm( ) FS_remove( ) / FS_removepgm( ) FS_mkdir( ) / FS_mkdirpgm( ) FS_mkdir( ) / FS_mkdirpgm( ) FS_fread( ) / FS_fwrite( ) FS_fread( ) / FS_fwrite( )

19 Universal Serial Bus Unit Uses interrupts. Uses interrupts. Meant for implementing mass storage device interface, but has the ability to be extended to human interface device. Meant for implementing mass storage device interface, but has the ability to be extended to human interface device. Includes USB descriptors and callback functions for PC commands. Includes USB descriptors and callback functions for PC commands. Important functions for the MSD run: Important functions for the MSD run: MSDTasks( ) MSDTasks( ) USB_isConnected( ) USB_isConnected( ) USBDeviceAttach( ) / USBDeviceDetach( ) USBDeviceAttach( ) / USBDeviceDetach( ) USBDeviceTasks( ) USBDeviceTasks( )

20 Menus Application – PDA Side Prints menus to the screen and returns to user’s choice. Prints menus to the screen and returns to user’s choice. Uses directly the keyboard, LCD, and file system. The status line unit and timer0 work in the background. Uses directly the keyboard, LCD, and file system. The status line unit and timer0 work in the background.

21 Menus Application – PC Side Creates and updates menu files for the PDA. Creates and updates menu files for the PDA. Programming environment:.NET C#. Programming environment:.NET C#.

22 Mass Storage Device Application As mentioned before, uses interrupts. As mentioned before, uses interrupts. The main function checks if the PC is connected to the PDA. If so, as long as the physical connection exists and the user didn't press ‘backspace’, the MSD protocol occurs. The main function checks if the PC is connected to the PDA. If so, as long as the physical connection exists and the user didn't press ‘backspace’, the MSD protocol occurs.

23 Birthdays Book Application A data-bank application. A data-bank application. Tests the units integration. Tests the units integration. The list can be managed through Microsoft Excel. The list can be managed through Microsoft Excel. Managed through TUI. Managed through TUI. Sorts the file (bubble sort), adds lines, deletes lines, parses lines, prints the list, find lines in the file, etc. Sorts the file (bubble sort), adds lines, deletes lines, parses lines, prints the list, find lines in the file, etc.

24 Mini DOS Application Because of the current FS disabled functions, the files are not included in the final project. Because of the current FS disabled functions, the files are not included in the final project. Tests the file system ’ s folder and search functions. Tests the file system ’ s folder and search functions. Managed through TUI in English. Managed through TUI in English. Shows path, changes path, makes or remove folders, show folder ’ s contents. Shows path, changes path, makes or remove folders, show folder ’ s contents.

25 Future Plans (for other projects…) Implementing a HID USB driver that will enable data transfer between the PC and the device components. Implementing a HID USB driver that will enable data transfer between the PC and the device components. Adding external memory to enable more applications. Adding external memory to enable more applications. Integrating the sensors data to the project. Integrating the sensors data to the project.

26 Summary And Conclusions The modules drivers utilize all the modules potential, and yet are very simple to understand and use. The modules can work simultaneously without interruptions, and support both Hebrew and English. The modules drivers utilize all the modules potential, and yet are very simple to understand and use. The modules can work simultaneously without interruptions, and support both Hebrew and English. When designing an application for the device, a deep thought should be directed to how to implement the application with a constant space complexity, in the expense of time complexity. When designing an application for the device, a deep thought should be directed to how to implement the application with a constant space complexity, in the expense of time complexity. By adding external memory to the PIC, simpler and faster implementations for applications will be possible By adding external memory to the PIC, simpler and faster implementations for applications will be possible

27 Thank You For Listening.


Download ppt "Mini Control System Final Presentation Performed By: Yaron Adler Supervised By: Boaz Mizrachi."

Similar presentations


Ads by Google