Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - UnDiViDeD

Pages: [1] 2
1
Off Topic / C Programming.
« on: March 23, 2009, 08:58:58 PM »
I've got to program a PIC chip with a 4x4 keypad.  I have to make a reverse polish calculator.  I wouldn't normally ask this, I don't even know if anyone here knows this stuff, but nobody in today's lab finished.  It's a crazy hard lab and our teacher doesn't really teach the stuff well.

I don't expect anybody to write the code for me, I don't even really expect help.  Any assistance would be much appreciated.

The assignment: http://www.eece.maine.edu/~eason/ece177/lab07.pdf

The starter code:

Quote
#include <pic.h>      // Always include this
#include "lcd.h"
#include "delay.h"
#include "printf.h"

__CONFIG(INTIO&WDTDIS&PWRTDIS&MCLREN&UNPROTECT&DUNPROTECT&BORDIS&IESODIS&FCMDIS&LVPDIS&DEBUGDIS);

signed char getkey(void);         // forward declarations
unsigned char mapkey(signed char);
signed int getnum(void);

// Global variables, #defines, and enums here
char operator;         // operator returned from "getnum()"
enum {enter=10, backspace, plus, minus, times, divide};


void main(void) {      // main program here

signed char getkey(void) {
// This routine will get a key on the keypad and will return the
// key number, or -1 if no key is pressed. Keys are numbered top to
// bottom and left to right and the keypad is mapped as follows

//             Output   Key
//             Bits     Number
//              0 |  0  1  2  3
//              1 |  4  5  6  7
//              2 |  8  9 10 11
//              3 | 12 13 14 15
//                 ------------
//                   4  5  6  7
//                   Input Bits


unsigned char mapkey(signed char key) {
//   Return the mapping of the given key according to the following

//    Key Number        Mapping
// |  0  1  2  3      0 |  1  2  3  +
// |  4  5  6  7      1 |  4  5  6  -
// |  8  9 10 11      2 |  7  8  9  *
// | 12 13 14 15      3 | BS  0 EN  /      (BS = Backspace)
//  ------------         ------------      (EN = ENTER)


signed int getnum(void) {
// Wait for user to enter a number followed by an operator. The
// function return value is the number. The operator is returned
// in the global variable "operator".


2
Off Topic / Best Birthday Ever!
« on: March 17, 2009, 08:50:23 PM »
Not really.  I turned 19 today.  I should be at school, with friends wishing me a happy birthday, and as many treats as I feel like buying.  Instead, I am stuck at home recovering from a loving seizure, during which I dislocated my right shoulder.  I may have to have my arm in a sling for weeks.  So now I sit here, typing this all with my less useful left hand, perusing all of the birthday wishes that appeared on my facebook, most of which encourage me to go party and have fun.  Sadly, I can hardly move, every part of my body is in pain.  The valium I just took is proving useless, just like the tylenol and aleve that I have been taking all day.  Anyways, I just felt like sharing my pain.  Feel free to mock me or tell me how what I'm feeling is nothing compared to the stuff you've all been through.

3
Off Topic / Tostitos!
« on: February 14, 2009, 06:54:51 PM »
So I opened my brand new jar of Tostitos Salsa Con Queso (Cheesy Salsa) last night.  I forgot to put it in the refrigerator.  I put it in the fridge this morning.  Think it's ok to eat?  I'm loving hungry for nachos.

4
Off Topic / Tension Problem.
« on: January 29, 2009, 05:41:36 PM »
My roommate and I are having trouble with this.


5
Off Topic / Public Speaking
« on: January 14, 2009, 06:50:12 PM »
I have a required public speaking class that I am taking this semester.  We will write and present 5 speeches.  I have a tremendous fear of speaking in public.  I get extremely nauseous and sick.  I sweat and stutter.  Any tips?  I really want to get through this course without feeling ill.

6
Off Topic / Passwords won't save.
« on: January 11, 2009, 06:58:11 PM »
I am using the latest version of Firefox.  My passwords are supposed to be saved, Firefox says they're saved, but they are not saved.  I'm sick of typing in my passwords like some not lazy person.

7
Off Topic / Linux Raped my Friends Computer
« on: December 04, 2008, 05:28:42 PM »
Quote
I am running two 320GB Western Digital 5400rpm hard drives in RAID 0 on my laptop.
Alright I tried installing installing Ubuntu  8.10 using the alternative install cd. It installed correctly and everything, but GRUB didn't recognize Vista on boot. I forced it to boot into Vista via command line, downloaded EasyBCD 1.7 or whatever the newest version is. After running EasyBCD and it telling me everything was great I restarted as told. Upon restart I came up with Missing Operating System. I tried the Vista Repair utility, it can't find an operating system so I tried the command line method to manually create a "good" Master Boot Record. I get through a few steps then when I try the step after creating the temp bcd it says that there is no recognizable file system. Anyone know how to fix or work around this? I would really hate to reformat.... that would be a huge pain in the ass. Also I know for a fact that all the files are still there because I am able to, via the find drivers thing in Vista's Repair Utility, see all of my folders and everything seems to be intact.

Fix it.

8
Games / Call of Duty: World at War
« on: November 06, 2008, 09:56:48 PM »
WHO IS BUYING IT?  WHO IS NOT?  WHY WOULD YOU NOT BUY THIS AWESOME GAME OF WIN?

9
Off Topic / Homework Help.
« on: October 16, 2008, 04:26:40 PM »
I was hoping some of you may be able to do this homework problem.  We have to show our steps in finding the equivalent resistance of the circuit, but I can't figure out how they got 502.


10
Off Topic / South Park.
« on: October 15, 2008, 09:31:02 PM »
NEW SOUTH PARK WAS LOL.

Discuse.

11
Games / Diablo 2: Lord of Destruction
« on: October 13, 2008, 09:45:20 AM »
Zerves and I recently made new characters, and realized how awesome this game is.  I used to play it, got to a pretty high level, then stopped.  Anybody else that owns it should come play with us.  We are on USEast, and we made ladder characters.

12
Off Topic / Have you heard?
« on: October 05, 2008, 08:40:35 PM »
Everybody's heard that the bird is the word!

13
Games / I Need Good Splitscreen Games for the Xbox 360
« on: September 30, 2008, 04:48:50 PM »
Any suggestions?  I don't really want to spend much money on them, but I might be able to get my friends to pitch in if they like the looks of the game enough.  Kind of looking for racing games, or anything other than FPS's really. 

Pfft college, almost everybody prefers consoles in an entire dorm of engineers.  My day is not complete without the sounds of missed notes on Guitar Hero floating down the hall.

Games I have:

Forza 2 Motorsport (Yuck!)
Halo 3 (Old.)
NHL 2k8 (Still fairly fun, but I have no competition.)
Guitar Hero III (Not only old, but my roommate sucks at it and refuses to play.)

I have some stuffty singleplayer ones, but I am more of a PC guy so I haven't bought too many Xbox games.

14
Off Topic / Our Friend the Atom
« on: September 25, 2008, 10:27:11 PM »
Some of you may have heard of an old show called Disneyland.  It was first run when Walt Disney was getting started on his themepark.  I'm looking for any clips from the episode titled "Our Friend the Atom".

This is the IMDB: http://www.imdb.com/title/tt0151857/

I'd be much obliged if you guys could find some, since I have failed.

15
Off Topic / Post Pictures of Your Ball Sacks.
« on: August 23, 2008, 10:37:46 PM »
It has been requested, so you must deliver.

Pages: [1] 2