• If you would like to get your account Verified, read this thread
  • The TMF is sponsored by Clips4sale - By supporting them, you're supporting us.
  • >>> If you cannot get into your account email me at [email protected] <<<
    Don't forget to include your username

Best Semester Ever

SilverleafLycan1

TMF Poster
Joined
Aug 2, 2005
Messages
123
Points
0
This is most definitely the best semester for me so far. It's getting towards the end of my first four years (2 semester excluding this one), and my computer science courses really kicked into high gear. For the most part all of my classes bore the hell out of me.

However...

CSIT 411 kicks ass. All we're doing is playing with microcontrollers, the worlds smallest computers. I really think I just found my career. It's so much fun playing with'em and all we've done so far is make an LED blink and I finished my assignment for next week (Chasing light LED's with 6 LED's (bonus if you make it bounce)).

I post for two reasons though, one I wanted to say that this rocks. Two, even after taking a semester of assembly language working with microcontrollers is very different. The assembly language I learned was based on the pentium system, so not extremely different mostly just different codes and fewer instructions. I'm wondering if anybody on here happened to have worked with microcontrollers before, cause I can only imagine my code is too long to manage this task.

The DELAY is simple enough, it runs through 2 counters working out to about .2 seconds of a delay before the LED changes. I hard coded the bounce, but my professor talked about setting up a state machine. In C I could most likely get this working, but I'm mostly lost in assembly.

CHASE
movlw b'11011111'
movwf PORTC
call DELAY
movlw b'11101111'
movwf PORTC
call DELAY
movlw b'11110111'
movwf PORTC
call DELAY
movlw b'11111011'
movwf PORTC
call DELAY
movlw b'11111101'
movwf PORTC
call DELAY
movlw b'11111110'
movwf PORTC
call DELAY
movlw b'11111101'
movwf PORTC
call DELAY
movlw b'11111011'
movwf PORTC
call DELAY
movlw b'11110111'
movwf PORTC
call DELAY
movlw b'11101111'
movwf PORTC
call DELAY
return

This is my current code to set up the chase. If anyone has any suggestions to shorten it up let me know. And if anyone has any of their own questions about coding or pretty much anything computer related I can most likely help out somewhat (I've coded in HTML, PHP, JAVA, C, C++, Assembly, Visual Basic, Python...think that's it)

In any case I'm psyched about this class...gonna work on making a UFO now.
 
Thanks for letting me know how computer retarded I am.🙂
I honestly understood maybe two words in your entire post.🙂
 
Hmm... is this a function you're calling? If so, did you renew the context and the program counter at the end? Also, what could (I'm not saying it is) be causing a problem is that the receiver might not be ready when the time comes. I'm not really sure, though.
I'm really sorry, as I haven't assembled in CSIT, only in FRISC and ARM (I'm only 2nd year of faculty).
 
It's a never-ending loop (supposed to be). Each time I call the DELAY function it places FF (hex) into 2 counters to create a roughly .2 second delay. The code works fine, I was wondering more about how to go and shorten it down. You can't decrement the binary number by an even number, and creating a function for each one to cycle through would just be tedious and more coding.
In reality I'm working on finding examples of a State machine coded in assembly, that way I could try to work it into this code.
 
What's New
9/10/25
When you support our advertisers you are also supporting us!

Door 44
Live Camgirls!
Live Camgirls
Streaming Videos
Pic of the Week
Pic of the Week
Congratulations to
*** brad1704 ***
The winner of our weekly Trivia, held every Sunday night at 11PM EST in our Chat Room
Back
Top