Editing BitWacker PIC and Other Microcontroller to Java Communications
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | + | == Introduction -- Testers Wanted == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | A new interesting device ( basically an advanced development board with firmware ) is the BitWacker: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[http://www.greta.dhs.org/UBW/ USB Bit Whacker] | [http://www.greta.dhs.org/UBW/ USB Bit Whacker] | ||
− | From the site: ''The UBW board is a small board that contains a Microchip PIC USB-capable microcontroller, headers to bring out all of the PICs signal lines (to a breadboard for example), only costs about $15-$20 to build and is powered from the USB connection.'' | + | From the site: ''The UBW board is a small board that contains a Microchip PIC USB-capable microcontroller, headers to bring out all of the PICs signal lines (to a breadboard for example), only costs about $15-$20 to build and is powered from the USB connection.'' There seem to be a fair number of additional projects based on this device. Google "Bit Wacker". |
− | |||
− | There seem to be a fair number of additional projects based on this device. Google " | ||
− | The developer has supported the PC end of the communications with a program in Liberty Basic. The project based here is to provide communications | + | The developer has supported the PC end of the communications with a program in Liberty Basic. The project based here is to provide communications using a JAVA application. |
− | |||
− | We | + | We expect to have some alpha level code in about two weeks ( from March 6 08 ) and are looking for testers. The tester should: |
− | * Have a | + | * Have a BitWacker and cables to connect to a PC. |
* PC running XP or Win 98 ( other versions may work, but you would be more on your own ) | * PC running XP or Win 98 ( other versions may work, but you would be more on your own ) | ||
− | * Some experience with JAVA | + | * Some experience with JAVA ( if you have a lot that is ok but please do not bash us on code quality for awhile ). |
The contents of this page should change fairly frequently for the next few weeks, check back if you are just lurking. | The contents of this page should change fairly frequently for the next few weeks, check back if you are just lurking. | ||
− | |||
− | |||
For more information contact [[russ_hensel]] | For more information contact [[russ_hensel]] | ||
− | = | + | === More Information: === |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == More Information: == | ||
− | |||
− | |||
This project will be open source under one of the usual lisences, if there is a push for it I will move to Source Forge at some point. | This project will be open source under one of the usual lisences, if there is a push for it I will move to Source Forge at some point. | ||
− | Here is a feature | + | Here is a feature list and some additional info: |
− | * Java ( which version? was jdk1.6.0_03 seems not to be compatible with windows 98, do we care? Have reverted to 1.4 something or other ) Current testing on XP only. | + | * Java ( which version? was jdk1.6.0_03 seems not to be compatible with windows 98, do we care? Have reverted to 1.4 something or other ) |
+ | Current testing on XP only. | ||
* Communication using java comm: RS232 emulation over USB. Not ideal, hard to install, some platform differences, like the naming of comm ports. In the Java world there does not seem to be a better alternative. | * Communication using java comm: RS232 emulation over USB. Not ideal, hard to install, some platform differences, like the naming of comm ports. In the Java world there does not seem to be a better alternative. | ||
Line 94: | Line 42: | ||
* Make GUI based, but provide Java Programmers with an API for custom applications, document for reuse. | * Make GUI based, but provide Java Programmers with an API for custom applications, document for reuse. | ||
− | * Control parameters of application through a property ( text ) file. Perhaps later add parameter control to GUI | + | * Control parameters of application through a property ( text ) file. Perhaps later add parameter control to GUI. |
− | * Include program debugging through log4j framework | + | * Include program debugging through log4j framework. |
* In the lower level API get away from text for arguments ( Port “A” “B”... ) and move to numerical arguments, this makes abstraction of the hardware easier and allows for easier looping through ports and bits. Also provide a fairly easy way to think about the hardware in the more traditional text model. | * In the lower level API get away from text for arguments ( Port “A” “B”... ) and move to numerical arguments, this makes abstraction of the hardware easier and allows for easier looping through ports and bits. Also provide a fairly easy way to think about the hardware in the more traditional text model. | ||
Line 106: | Line 54: | ||
* All code specific to BitWacker will be in a small set of classes ( or 1 class ) so that applications can be switched to other devices ( or versions of BitWacker without much application change. | * All code specific to BitWacker will be in a small set of classes ( or 1 class ) so that applications can be switched to other devices ( or versions of BitWacker without much application change. | ||
− | * | + | * Include floating point scaling for analog inputs. |
− | * Command protocol: is parameter controlled, so can be varied typically command is printable characters followed by a standard termination character ( typically cr or lf ) waits for a microcontroller response ( a sting of printable characters ), a standard termination character ( typically cr or lf ), or times out, or reaches a maximum length. Records the reason for the end of the response. | + | * Command protocol: |
+ | is parameter controlled, so can be varied | ||
+ | typically command is printable characters followed by a standard termination character ( typically cr or lf ) | ||
+ | waits for a microcontroller response ( a sting of printable characters ), a standard termination character ( typically cr or lf ), or times out, or reaches a maximum length. Records the reason for the end of the response. | ||
− | + | === First Application: === | |
− | + | The RS232 Probe: Sort of a terminal emulator but with some special features to test embedded devices. Store multiple commands and issue with press of button. Implement various handshaking/flow control. | |
− | + | === Second Application: === | |
+ | Fairly direct implementation of the BitWacker Command API with one parameter controlled button for each ( most? ) command. Ex: button for PO" ( "Pin Output" ) will have GUI edit controls for entry of Port, Pin, and State. GUI will also support display of BitWacker response as appropriate. | ||
− | + | === Third Application: Graphical Data Logger === | |
− | |||
− | |||
− | |||
+ | For low speed logging, up to say 1 measurement per second. Nice graphical output ( using PtPlot ) | ||
− | + | == Installation Directions ( This is a first guess, more details will follow ) == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | Configure Java JDK ( later will have directions for the runtime environment ) as it suits you. | ||
+ | Download and install the java comm API for your platform. This can be a problem because a bad installation often fails without any messages. | ||
+ | Download BitWackerJava.zip. Unzip to an installation directory ( c:\BitWacker for example but in any case avoid directory names with embedded blanks ) Do not un-jar the jar file ( unless you just want to mess around ) Source code will be provided in BitWackerJavaSource.jar when it it a bit more stable. Note that renaming the .jar file to .zip will allow you to extract the files with most zip utilities. | ||
+ | Edit BitWacker.properties for your configuration. ( see section below on BitWacker.properties and directions in the file ) | ||
+ | Edit the BitWacker.bat file for your configuration ( see directions in bat file ). You may want to do this in a copy of the file so that you always have the original bat file ( or maybe we will give you two copies. | ||
+ | Double click the bat file to run the program, begin debugging the installation. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Example Property File == | == Example Property File == | ||
− | |||
− | |||
− | |||
; BitWacker.properties | ; BitWacker.properties | ||
− | ; comments indicated by leading ; | + | ; comments indicated by leading ; |
; --------------- | ; --------------- | ||
Line 316: | Line 190: | ||
End Example Property File | End Example Property File | ||
− | |||
− |