Showing posts with label c programming. Show all posts
Showing posts with label c programming. Show all posts

Monday, April 27, 2009

Finals Week

Today marked the first day of finals week. My finals include Differential Equations, Linear Algebra, Engineering Physics, and Computer Science I (C++). Today I finished the Differential test, and tomorrow is Engineering Physics. For whatever reason I am really relaxed, who knows why.

I was getting sick of studying this past weekend and took an hour to write a little paper that introduces the basics of C programming, download-able here (pdf warning). It's nothing special, and I don't intend to distribute it like I did with my AVR screencast tutorial. Something fun to do I guess.

Sunday, October 12, 2008

New e-mail working, along with some updates

Nothing new or exciting happening, but I did get salgat@salgat.net up thanks to zoneedit and Google domains. Test next week for math, 2 tests the week after for Physics and Statistics. Anyways, it is 1:30Am and I haven't really done much math homework, although the test is Wednesday. Going to do most of it tomorrow, save Tuesday for Physics. Tuesday I plan on also getting a table in my room and setting up my microcontroller "lab." I may start crunching homework in order to find more time for my hobby stuff, I have this book C Primer Plus that I may start cracking at. I have found that my biggest issue is not the language as much as the compiler. I am still not familiar with how to control the compiler to do what I need it to do, linking and whatever other things exist out there, along with the best techniques to use with programming. I'm afraid if I go too far I'll develop a horrible approach to programming haha. Well, October has arrived, and I am thinking of going out and getting some Apple Cider, which sounds delicious right about now...

Saturday, May 24, 2008

Just received the JTAGICEMKII!


I am the proud new owner of the new JTAGICEMKII! I consider it to be a present to myself for taking up this job. It was very expensive, but very awesome. You could look at it as an investment, since its use covers nearly all the AVR devices. This thing both programs and debugs in real-time. When running AVR Studio 4 you simply choose the jtagicemkii as your debugger platform and the rest is done automatically. Instead of the usually debugging which is done all in a simulator on your computer, this thing works in real time single stepping through your program and displaying each step on your microcontroller. I am just amazed at this thing. No more worrying about whether or not it will run correctly after loading the entire thing onto the flash. With this I can manually guide the microcontroller through its functions and see for myself what is going on (instead of hoping that a 50mS blip of port changes worked correctly). I'm thinking about buying myself one more toy over the summer, the STK600. The STK600 will allow me to expand my options to the SMD world, and give me access to the AVR32 line of microcontrollers. I definitely want to have a good go at trying 32 bit processors, especially since I have a programmer (the jtagicemkii) that will work for the AVR32. This programmer/debugger cost me about $300, and the STK600 costs $200, not including the two socket adapters I'd buy for it. All together I'll probably need to spend $400 on it to get the best selection, opening up my options to most of the ATMegas, the CAN AVR, the AVR32 Flash microcontrollers, and finally I expect it to come with the TQFP-100 socket allowing me access to the ATXMegas coming out soon. Is it worth the investment? Well, $700 for the ultimate AVR setup should be worth it.

The only reason I'm planning on getting all this stuff is that it does dramatically aid my education in the field I am majoring in (Computer Engineering). Knowing this stuff will give me an edge over other people. On top of that, it seems as though I may be working more than I originally expected. Lately I have been working full time hours, and have been working late and through my lunch. This all equates to cash that I can use for both school and my personal hobbies. To put it simply, this past week more than covered the cost of the device I'm using now. I'm still saving the majority for school, but buying things like the jtagicemkii gives me an incentive to work and grows my hobby options. The unfortunate drawback to working is that it heavily cuts into my hobby time. I figure if I'm going to sacrifice so much time for work, I might as well make up for it. Hopefully my boss hires another part-timer so I can have more time for my personal work. I love my job, but it is taking up so much time.

Friday, April 25, 2008

Good News!




The other day I was awarded, by Mr. Harrill, the "Outstanding Student Award" for Electronics and Computer Technology. I was honored by him two days ago at the Meyer theater and my family attended (including my sister's boyfriend). This honor is definitely a resume booster. On top of that, I received a call the same day for a potential job. I was out when I was called, and had to call back. I go in for an interview on Thursday, after all my finals are finished. I'm really excited, if I am able to get the job this will be my first real job in electronics. I also receive my Electronics and Computer Technology Associates Degree after I finish this semester, and I expect to have at most one B for this semester (in Sociology). This has been a great week, and I'm really happy.

In addition to all the important things, I also have finally gotten a GLCD to work properly. Mr. Harrill purchased one a few weeks ago and unfortunately it only came with a single page for a datasheet that gave a potentially wrong pinout. The darn thing wouldn't work after 3 hours, and after extensive debugging of the program I checked the wiring over again. I happened to touch the controllers on the back of the GLCD and noticed they were extremely hot. After that fiasco I went and bought my own off of Sparkfun since they provided heavy documentation (to note I was the one who told Mr. Harrill to buy the faulty GLCD from Mouser). The Sparkfun GLCD used the same controllers and after plugging everything in the program worked great. As of now it is a very simplistic program that displays a line (simply to test the thing). I intend on making a quick picture displaying program for it after I finish with finals this upcoming week. It should be great for the presentations we (Mr. Harrill, Alex and I) do for the Electronics section at various High Schools. Mr. Kelly and Alex suggested a simple game, which I probably will end up doing. A simple scroller where you control a horizontally stationary sprite that navigates through a path, similar to this.

Over this weekend I have to wrap up studying and any leftover homework. If we manage to box up most of the lab (for the lab renovations) before the weekend I will be able to finally start reading K&R. Ugh, 8 classes with 8 tests next week. Thankfully I only have 19 credits next Fall semester, the free time for personal projects and a possible job will be amazing. Below is my schedule for the Fall,

ART-155-01 (13466) Art Appreciation
MECH-102-01 (13902) Manufacturing Processes
MATH-162-02 (14052) Introduction to Statistics
PHY-251-01 (14065) Engineering Physics I
MATH-271-01 (14061) Calculus III


Don't mind the Art Appreciation, that's for the Computer Engineering Degree. After all, I need to be "well rounded." :)

Monday, March 24, 2008

Learning C Programming


I've decided to take up learning C for the AVR 8-bit microcontroller. Although I enjoy programming in ASM, larger scale projects require C programming. I suppose the LCD program was a wake up call as to how useful C programming is. I wanted to create a function in C that would output a string to the LCD display. Essentially I wanted to be able to type LCDPrint("Testing!"); and have "Testing!" appear on the display. After a few days working with C, I came up with a simple program that does just that. Arrays are fabulous for just this type of thing, and this was a great chance to learn the language.

Mr. Harrill, my electronics professor, has requested a project on outputting a keyboard to a LED display. I plan on interfacing the keyboard to an LCD display and then having that output go to the larger LED displays. This LCD program I made is the first step in that process. Since I don't want to have a large bundle of wires going to every LED controller or setting up extra hardware such as shift registers on the LED end, I need to work on doing USART communication between microcontrollers, and also interfacing with a keyboard. The keyboard seems to be quite easy, since I could probably setup an interrupt based system where it reads the bit value after each clock pulse. USART will be used simply because it's easy to use and is supported by nearly all AVR microcontrollers. I wish I had more time to work on all this, I barely had time to setup the LCD program. As stated earlier, classes, in this case macroeconomics, are crowding up my free time. Anyways, attached in this post is the program to interface with the 2x16 character LCD.

EDIT: Oh and did I mention I got a new job at the college?

LCD Interfacing Program: http://salgat.googlepages.com/LCDInterface.zip