Thursday, February 25, 2010

iPhone Programming Course

A while ago, I stumbled across the Stanford iPhone courses on iTunesU. The courses are videos of the actual iPhone development course at Stanford University. I used these a few months ago to get familiar with the XCode IDE and the iPhone SDK. 

Now that I actually landed a small gig as an iPhone developer, I have been thrown into the belly of the beast. Because I'm in such a fast-paced environment, I'm learning WHAT to do to get things working, but not so much WHY I'm doing it this way. I'd rather not be solely a creature of habit, and would like to understand the inner-workings of the code that I'm....coding.

With that being said, I decided to take some time and revisit the Stanford iPhone course. I believe this will be time well-spent; an investment in my future as a Cocoa/ Objective-C developer. After finishing the first episode, I feel enlightened on a couple of nagging issues I had before. I'm sure this trend will continue as I progress through the course. 

I actually found another iPhone course at RWTH Aachen (a German school). Maybe I'll check this out another time.

Friday, February 19, 2010

Random Thought

I've recently come to the realization that few things are impossible - some things just haven't been done yet. As a software engineer, my job is to figure how to do these things.

Monday, February 8, 2010

My First Deadline

The past two weeks have really introduced me to "The Fire" by which entry-level programmers are often baptized. I have been moving non-stop for 15 days straight now. On day #12 of my never-ending workweek, I was given an assignment: insert a Google Maps View on a pre-existing screen and drop a pin on a given address.....*for delivery to the customer in 2 days.

I found lots of resources online and made a few practice apps. At the end of my research, I made a proof of concept to demonstrate the requested functionality. When the moment of truth came, and I was given access to the repository with the project's source code, I felt an overwhelming sense of...well, honestly, fear. But in addition to that, I felt proud that I had made it to a point where I could be held responsible for such a task.

After I got myself together, I began to focus on the task at hand: integrating my code into the project. This would not be as simple as it seemed. I ran into lots of issues, from breaking the code altogether and having to start over and re-sync, to having it build, compile, and run but seeing no sign of my added functionality.

There was a point where it looked like I might not make it. But I stayed up all night on Saturday, and even worked all day [Superbowl] Sunday (and did not watch the game), until I got the desired results. Of course, that couldn't be the end...although I got it working on my computer, I still had trouble committing the file to the repository. I had to delete the entire project, re-sync, then copy and paste my code into the files I altered to get this resolved.

I managed to get my code checked in and made my deadline!

This is really a big deal to me. This is my first time writing code to be used professionally. It is really a confidence builder to know that the company has enough faith in me to use my code in a release on a major project. I really feel like this was a huge first step on my path to becoming a professional software developer.

Wednesday, January 13, 2010

iPhone dev position

YES! I recently got a part-time contract position as an iPhone developer with a small start-up company in the area. This opportunity is exactly what I've been looking for because I can learn Objective C and the iPhone/ iPod touch SDK. I'm not expected to know it all already, and am learning it with a few others in my shoes. Since it's part time and contract, I can still have a full-time job (which I'm still looking for btw...).

I definitely plan on learning as much as I can from this company!

Thursday, January 7, 2010

SPARKFUN FREE DAY!

I've been trying to keep this to myself, but today is the day the saints at Sparkfun are giving away $100 worth of free merchandise per customer until they reach $100k. All you have to pay is shipping! Currently, the site is down :-( but I'm waiting patiently for my turn. I just hope people are going to be honest and not cheat. I know it's inevitable with this clientele though :-\.



Here's my list:
Since I have a few PSPs, I figure I can experiment with one of them. I want to put a touchscreen on it. Seems like fun.

Anyway, wish me luck!

Update 1: :-(

Update 2: It's over. I didn't get it. Oh well. Gives me more time to plan my project instead of just impulse buying :-). I still plan on having these parts procured within the next 2 weeks.

Thanks anyway Sparkfun!

Monday, December 21, 2009

Playing with a 555 Timer Circuit

So I was bored yesterday and started going through my box of ICs. I came across a 555 timer chip, and an LED in my head went off:

Why not try to make some LEDs blink?? 

The original idea was to make a little blinking ornament or something. I still may, but I'm just happy I got it to work. Here's what I did.

I looked up the 555 timer datasheet and some example circuits. The Wikipedia article had some really good information as well. I learned that there are two modes which the timer can operate: monostable and astable. Monostable mode is a one-time pulse. Astable mode repeats that pulse indefinitely.

Armed with my new knowledge on monostable and astable operation, I realized that I needed an astable circuit, because who wants their decoration to blink once and quit? That's no fun. Anyway, I looked up some of the formulas, which would have been intimidating, had I not been tortured by introduced to all of these concepts during my university career.

In my net travels, I came across this excellent 555 resource. I learned that in order to get a duty cycle close to 50%, I need to choose R1 = 1k.

After I had everything all wired, I powerd it up and the LED lit up....but it didn't blink. This bothered me for a second, then I realized what was the culprit: the capacitor I used was a really large value. I switched it out for a 100uF and it blinked, still slowly, but blinked nonetheless. The duty cycle was at 50% because of my R1 resistor value. Then, I switched out the capacitor for an even smaller value (1uF). This blinked very rapidly - much faster than I would like, but at least I was learning how the timer worked.

I realize that by using the formula, I can more accurately pinpoint a frequency. This was just a preliminary exercise though. I definitely hope to get deeper into this chip later.

Monday, November 30, 2009

Power Supply Design

For the project I'm working on, I need to design a power supply which results in an output voltage of 3.8V. I think I'm going to have the GE864 chip controlled by another micro in order to more easily control the timing required for power (turning the chip on and off requires a 1s pulse, restarting requires a 200ms pulse on a different pin).

Although I haven't selected the microcontroller I'm going to use yet, I have designed the circuit which will interface with its output, which corresponds to the GE864's input (ON or RESET pins). I have designed my power supply circuit with an input of +5V from the micro and an output of +3.8V going to the GE864.

Right now I'm getting power from an old PC power supply. I found the pinout for the main harness and switched the green and black wires in order to turn it on and off. Using my multimeter, I measured different output voltages between pairs of wires. Some were +12V, some were +5V. I decided to start with the +12V coming from one of the floppy connectors.

I ran power from the yellow wire on the floppy harness to the power block on my breadboard, and did the same with ground. To clean up the input some, I used a 100uF electrolytic capacitor. In order to bump down from +12V to +5V, I just used a 7805 +5VDC Voltage Regulator from Radio Shack (way overpriced, I know, but instant gratification). I chose to go this route instead of just using the +5V from the PC's power supply because I wanted a more accurate reading. Coming directly from the supply wouldn't have given me as close to +5V as bumping down with the regulator.

So now, I have a clean +5V to work with. But I need to get to +3.8V. For this, I decided to use the LM317T Adjustable Voltage Regulator, and I'd just design a circuit around it.

I just decided to use a good old-fashioned voltage divider. The LM317 was too tricky. The voltage divider was straightforward and since I was on campus, obtaining the parts was free, as opposed to  unnecessarily expensive.

Designing a circuit with my specifications was not difficult at all (Prof. Dragon is the MAN!). Here are my calculations:





Vin to the voltage divider was my +5V from the voltage regulator. Vout is the +3.8V that I need to power my chip. I selected a random value for R2 = 3k and just calculated R1 from the voltage divider formula.

Here's the schematic representing my circuit:




I used the 1N401 diode to protect against backwards current and the capacitors to filter the input and output. My theoretical output was 3.75. I actually measured 3.73, which should be fine for this

SO glad I got this working now! Next I can work on how I actually want to go about turning the chip on and off. I'm thinking of using a separate micro to send ON/OFF signals to the GE864 instead of doing it manually.