Go to Post Go get Al, he probably isn't busy! - Jimmy Nichols [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 29-09-2003, 08:18
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Quote:
Originally posted by djcapelis
You need an interrupt for that? I thought that was the main program loop...

You also seem to be missing the ask_number and make_conversation functions, file corruption perhaps?
didnt have the processing bandwidth to peform those tasks and meet the real time requirements of the multiple engineering_class routines.

had to establish strict priorities or the entire program might crash.
  #32   Spotlight this post!  
Unread 29-09-2003, 22:30
djcapelis's Avatar
djcapelis djcapelis is offline
Fried Manic Custard
None #0675 (Geeks with Power Tools)
Team Role: Programmer
 
Join Date: May 2003
Rookie Year: 2001
Location: Rohnert Park, CA
Posts: 129
djcapelis will become famous soon enoughdjcapelis will become famous soon enough
Send a message via ICQ to djcapelis Send a message via AIM to djcapelis Send a message via Yahoo to djcapelis
I wonder if larger hardware would have solved that problem.

(Yes, old joke and a bad one I know...)
__________________
"I have more friends than enemies, I'm working to resolve the issue."
  #33   Spotlight this post!  
Unread 29-09-2003, 22:48
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
lol



I wonder if there will be any sort of ICD capabilities. Does anybody know the specific pic?
__________________
1139 Alumni
  #34   Spotlight this post!  
Unread 30-09-2003, 11:22
Jeff McCune's Avatar
Jeff McCune Jeff McCune is offline
Alpha Geek
#0677 (The Wirestrippers)
Team Role: Mentor
 
Join Date: Jan 2003
Location: The Ohio State University
Posts: 67
Jeff McCune is on a distinguished road
Send a message via ICQ to Jeff McCune Send a message via AIM to Jeff McCune
Quote:
Originally posted by Ian W.
Hehe, learning interrupts the hard way...

The best part is that with ATX, you don't break Windows horrible when you hit the button.

Now, about these interrupts. Do they actually mean anything to us, if the code is structured at all like last year?
They mean a ton to us. Have you tried to implement a shaft encoder with the basic stamp alone? Wouldn't it be nice if you didn't have to ASK the sensor for data all the time, and you could just be TOLD when the sensor tripped?
Quote:
Last year, you could process all you wanted, but only output once per cycle. Will it be different now, since we can control all the pins, or will it be the same? If it's switch something whenever, however, then interrupts will be cool, otherwise, they seem nice, but kinda pointless.
I think you fell into the same trap many people fell into. First's default code is only an example that does I/O once per cycle through mainloop: There's absolutely nothing stopping you from reading in more data or writing out more data during the same iteration of the main loop. We implemented quite a few subroutines in our code that wrote data out to an external basic stamp and read it back in (External stamp was only counting clicks on a shaft encoder). In theory, if they gave you enough interrupts you could have a nearly empty main loop and do *everything* you need in interupt handling routines. And you'd probably be a lot better off, too, as you'd be only executing code you needed to execute at that particular time. About the only thing it would still be wise to poll would be the joystick axis.
Quote:
Also, any ideas on whether or not we'll be getting a default code to build off of if we so choose?
I'd be surprised if they didn't give some example default code. Quite a few teams rely on the default code.
__________________
Team 677 - The Wirestrippers - Columbus School for Girls and The Ohio State University
EMAIL: mccune@ling.ohio-state.edu

...And all you touch and all you see
Is all your life will ever be...
  #35   Spotlight this post!  
Unread 30-09-2003, 14:20
JP_1163's Avatar
JP_1163 JP_1163 is offline
mentor
#1163 (Trojan Horses)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Faulkton, SD
Posts: 90
JP_1163 will become famous soon enoughJP_1163 will become famous soon enough
C programming (o:

PBasic programming )o:

The programming issue is here to stay. My only concern as a mentor to a team is providing my students with examples and assistance during the school year. Since my students do not have programming experience and will have to learn on the fly I have a question. Is there a viable, reasonable and teachable source of information on the C language available for student use? I am not a programmer and have limited (read none) access to programmers so anything I get will have to be understandable and teachable to non-programmers. Maybe if we start early enough we'll be able to get a workable autonomous program ready for the robot year!
Suggestions welcome.....

  #36   Spotlight this post!  
Unread 30-09-2003, 14:41
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
JP - my first suggestion would be to hook up with a SW engineer on another team who can be your mentor

even if that means you tell him what you want your SW to do, and he writes it all for you.

I have to assume that FIRST is going to supply a default program, like they always have, so each joystick will control a pwm output and each pushbutton will control a spike relay output

lots of teams use the default code and never change a line of it

so dont panic yet.

But if you can get a few students on the team able to understand C to some degree, they should be able to make minor changes to the 'new' default code.
  #37   Spotlight this post!  
Unread 30-09-2003, 15:22
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Interrupts

Quote:
Originally posted by vladg12
No one has mentioned the most useful purpose of interrupts: TIMERS!
Is anyone familiar enough with Microchip's line of processors to speculate whether or not the new Robot Controller will allow us to sample the system clock for timing purposes?

If you can not use the clock like in the current PBASIC Controllers, I would consider the whole upgrade a failure. If I have to count program iterations and change my timing constants every time I update the program with this new processor, then Innovation First is incompetent. It has interrupts and the highest priority interrupt is the system timer (just like in your PC). Can someone please tell me that I will not need to build a separate circuit for a simple crystal?
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"
  #38   Spotlight this post!  
Unread 30-09-2003, 15:49
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Ive used MicroChips parts for many engineering designs. They are simply delightfull parts - you can get them with only 8 pins, or up to 40 or more

and they have all kinds of HW functions built in, timers counters PWM generators A to D converters, LCD and keypad interfaces

so the only thing we dont know yet is which PIC chip they are using, and how many of the functions and pins we will have access too?

Im pretty sure they all have at least one or two timers built in - bottom line is we will have to wait and see.

One thing to keep in mind in all of this. FIRST is not a robot building contest - its a program to teach students about the engineering design cycle.

Its not our purpose or intention to make the most sophisticated or elegant robot in the world - the idea is that we all start out with the same requirements, the same goals, and the same choices of what we can use, and see who comes up with the design that is most competitive.

If they threw the doors wide open and let us use whatever we want, then the winning team would be the one with the most engineers and money.

Having one hand tied behind your back by the tradeoffs you are forced to make, is part of the challenge.

and thats how it is in real-world engineering too. We cant put the most expensive parts in everything we build. Cost, performance, and time to market are a three sided triangle that must be balanced.

in the FIRST program the constraints are imposed artifically - they have to be, we only get 6 weeks. In the real world engineering programs can take anywhere from 6 months to 10 years.

Last edited by KenWittlief : 30-09-2003 at 16:18.
  #39   Spotlight this post!  
Unread 30-09-2003, 15:59
JP_1163's Avatar
JP_1163 JP_1163 is offline
mentor
#1163 (Trojan Horses)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Faulkton, SD
Posts: 90
JP_1163 will become famous soon enoughJP_1163 will become famous soon enough
[quote]Originally posted by KenWittlief
[b]JP - my first suggestion would be to hook up with a SW engineer on another team who can be your mentor

Ken,

That would be the best. I'm not in panic mode yet...
Thanks.
  #40   Spotlight this post!  
Unread 30-09-2003, 17:39
dez250 dez250 is offline
54... What a good number!
no team
 
Join Date: Dec 2002
Rookie Year: 2000
Location: Upstate NY / Manchester, NH
Posts: 1,721
dez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond reputedez250 has a reputation beyond repute
Send a message via AIM to dez250
JP, pm me here or email me at m.dessingue@team250.org and i will try to get you some good instructional items or learning materials on C.
~Mike
__________________
#5

-Michael Dessingue
  #41   Spotlight this post!  
Unread 30-09-2003, 18:48
catlin101's Avatar
catlin101 catlin101 is offline
Registered User
#0461 (West Side Boiler Invasion)
 
Join Date: Sep 2003
Location: West Lafayette, IN
Posts: 8
catlin101 will become famous soon enough
Thread Synchronization

Hey, I was looking at a few examples of PIC micro code, and the ones with interrupts didn't say anything about thread synchronization. Does anyone know of any functions like LockInterrupts() or anything like that, or are we just supposed to hope that an interrupt doesn't modify data while the main thread or another interrupt is using it
  #42   Spotlight this post!  
Unread 30-09-2003, 20:29
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
thread synching is minimal. about as sophisticated as it get is disabling interupts( at least in assembly ). Its your job to handle thread synching.


And yes there are at least 2 hardware timers on most PICs.
__________________
1139 Alumni
  #43   Spotlight this post!  
Unread 30-09-2003, 21:04
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Thread Synchronization

Quote:
Originally posted by catlin101
Hey, I was looking at a few examples of PIC micro code, and the ones with interrupts didn't say anything about thread synchronization. Does anyone know of any functions like LockInterrupts() or anything like that, or are we just supposed to hope that an interrupt doesn't modify data while the main thread or another interrupt is using it
Microcontrollers have an assembly instruction to disable interrupts. I'm guessing Innovation FIRST will provide a library that will implement a DisableInterrupts() type function in C which will simply call that assembly instruction (to prevent the need for teams to deal with assembly directly).

BTW (and it sounds like you probably know this already), you should never "hope" that an interrupt (or thread in a multithreaded system) won't modify data at the same time as another task. It will happen eventually, and it causes problems that can be really tough to debug.
  #44   Spotlight this post!  
Unread 01-10-2003, 09:56
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
I had an old german professor in college, Dr Schmidt. Every few days he would give us one of his golden rules.

Concerning interrupts. First you have to design your system (SW and random input signals) so that your code runs by polling the inputs periodically.

once you have gone through the task of calculating how often each input signal will require attention, and how long it will take to service that signal

THEN you can use interrupts to implement the SW routines.

But if you cant service the interrupts by knowing how often to poll them, then if you blindly give each on an interupt instead, sooner or later they will pile up on you and the system will crash.

In other words: Interrupts should never be necessary to make your system work, use them only as a convienence.
  #45   Spotlight this post!  
Unread 01-10-2003, 15:18
vladg12 vladg12 is offline
Registered User
#0117
 
Join Date: Sep 2003
Location: Pittsburgh
Posts: 7
vladg12 is an unknown quantity at this point
Controller Info

Has anyone been able to find the info about the new controllers that was supposed to be posted today? I can't find it either at innovationfirst.com or at usfirst.org. I called up both companies, and Innovation First told me that it's on FIRST's website, while FIRST told me that it's on Innovation First's website....
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C controller Rorschach Kit & Additional Hardware 1 29-10-2003 19:21
serious problem found - robot controller resets when jarred! KenWittlief Electrical 23 19-03-2003 13:30
Visibility of Robot Controller and Reset Button Tracy Rules/Strategy 1 17-02-2003 07:36
How do you connect the speed controller fans? Iain Electrical 7 31-01-2003 07:05
visibility of robot controller? davidzhang Rules/Strategy 5 26-01-2003 01:11


All times are GMT -5. The time now is 21:21.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi