go away spammer

Author Topic: very confused  (Read 3699 times)

0 Members and 1 Guest are viewing this topic.

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
very confused
« on: March 31, 2008, 01:56:52 AM »
hello, ive bee looking into the $5o robot code and ive heard that you have to specify the abilities of the microcontroller at the beginning. I don't understand. Do you have to program each microcontroller differently in c or could i use a tutorial for a pic controller with avr atmega8

Offline Tsukubadaisei

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: very confused
« Reply #1 on: March 31, 2008, 04:54:43 AM »
hello, ive bee looking into the $5o robot code and ive heard that you have to specify the abilities of the microcontroller at the beginning. I don't understand. Do you have to program each microcontroller differently in c or could i use a tutorial for a pic controller with avr atmega8

Yes, different microcontroller brands(like pic, atmega or sh) need different codes because their compilers and definitions are very different. The standard C is the same but the address numbers are different and the tags attached to those addresses(through #define) are usually different. With controllers from the same brand(like atmega 88 or atmega 32) sometimes the code can be very simiar(if not the same). So ADMIN's code for the $50 robot will not work on a PIC(he uses an atmega, I think).
A.I.(yes those are my initials)

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: very confused
« Reply #2 on: March 31, 2008, 06:20:54 AM »
YOUR ANSWER IS THE LOGIC IS ALWAYS THE SAME,

ITS THE DECLARATION AND SYNTAX THAT DIFFERS , IN PIC THE REGISTER ADRESSES AND NAMES ARE DIFFERENT BUT THE LOGIC WILL ALWAYS BE THE SAME ... SO YES THE ADMIN'S LOGIC "NOT THE COMPLETE CODE" WILL WORK WITH PIC
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: very confused
« Reply #3 on: March 31, 2008, 03:04:11 PM »
Ok so the loops and all of that stuff in c will work with any controller but when you are controlling the ports its different

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: very confused
« Reply #4 on: March 31, 2008, 03:07:38 PM »
also how would i know what i need to change when programming a different controller

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: very confused
« Reply #5 on: March 31, 2008, 03:37:09 PM »
well friend for that u need to learn a little abt embedded c and which registers to access in the type of microcontroller ur using
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: very confused
« Reply #6 on: March 31, 2008, 04:59:25 PM »
Also what out of the $50 robot code do you need if you were starting from scratch on a different robot. I want to understand the basic structure of the code so I can build on it for different projects.

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: very confused
« Reply #7 on: March 31, 2008, 10:22:03 PM »
if u want to understand the code then have a thorough reading of the complete codes and header files, the more clear u are abt the code the better will be ur understanding abt the subject..
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline nckspecTopic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: very confused
« Reply #8 on: April 01, 2008, 01:54:46 AM »
Thank you so much, i read through the $50 robot code and stampy code and now i understand a lot. And I was about to spend $40 on an online tutorial to learn this stuff.

 


Get Your Ad Here

data_list