ASCII Problem

I was having some problems getting the microcontroller I’m using for bluetooth development to recognize certain characters being sent to it via serial. What was baffling me was the fact that certain keys worked, but other did not. For example, characters such as @, #, $, etc were working fine, but letters were not. I’m using Hyperterminal to send the characters to the development board, which is in turn taking the ASCII value and performing an action based on that value. For my testing I was having specific LED’s turn on when a particular character was sent to the board. After being stumped for a few hours, it turns out that a little Counter Strike was exactly what I needed. Some annoying youngster was having fun yelling into the microphone and typing IN ALL CAPS in the chat. Thats when it hit me: the code in the microcontroller was expecting a CAPITAL letter when I was only sending it lower case letters.  I blame this on the fact that the ASCII chart I had was missing the 2nd page that had the lower case letters.  No matter, now that I’ve gotten that annoyance out of the way, I can expand the functionality of the program to accept more complex inputs.

Development Board

Earlier this week, my development board with bluetooth chips arrived. The kit is from Comfile and uses their CB280 microcontroller. Their development software is very easy to use and will make developing applications a lot easier than using the Texas Instruments MSP-430 microcontroller that I had to use for one of my classes. You can use BASIC or Ladder Logic to write probgrams, however I have never used Ladder Logic before. To be honest I have never used BASIC before either, but since its a normal programming language rather than a pictographic conglomeration, it wasn’t hard to pick up on. Its a hell of a lot easier than the assembly that I had to write for the MSP-430. As you can see in the picture below, the development board has a bunch of fun stuff on it, like switches, LED’s, and a few potentiometers (really for A/D stuff). Also shown in the picture are the two bluetooth chips that I’ll be using in a project with a friend of mine. The smaller circuit board shown allows the bluetooth chips to be initialized and connected to a RS-232 serial I/O.

comfile start kit
The main purpose for the kit is to develop a few bluetooth applications with a friend of mine. We had the idea to use bluetooth to control several aspects of his car, namely the door locks and the ignition. This would act as a remote ignition system with the added feature of being able to be controlled by a cell phone or PDA. There are other extensions of the bluetooth control that may be developed later, such as allowing the PDA/cell phone to have control over additional aspects of the car and the carputer.

Currently, I’ve been working on the program that will take the signals form the bluetooth chip, do the proper interpretations, execute the desired action, and send an acknowledge back to the sending device. Since the bluetooth chips require a separate initialization and can take regular RS-232 inputs, I will work on the wireless implementation once the software portion is working. As it stands, the microcontroller can interpret single letter commands from hyperterminal via serial. The next step is to extend this to character strings. If necessary, an encryption scheme can be implemented on the data being sent, however whether that will be an issue will come later. Hopefully I’ll have the board recognizing character strings by the end of the week, as long as I don’t spent all my time skiing….