Go Back   UG Community @ Ultimate-Guitar.Com > UG Community > The Pit
User Name  
Password
Search:

Reply
Old 10-14-2012, 02:03 PM   #1
Jmz123
Registered User
 
Jmz123's Avatar
 
Join Date: Feb 2006
Any C Programmers Out There?

I won't go into too much detail because it doesn't change the end result too much.

Basically, for my dissertation I have been given a project which involves programming a microcontroller to be hooked up to a load of electrodes and then certain patterns of pulses are generated by the microcontroller. Only issue is, I have never done any programming in my life.

(you may be thinking 'why the hell are you doing that as a project then?'. I have absolutely no idea but I have it now so I have to suck it up and deal with it)

So my first assignment is in for about a months time and it involves programming this MCU to output a specific waveform pattern to an oscilloscope so it can be seen.

I have absolutely no idea where to even begin. Do I start by learning the basics of C or do I just find pre-existing codes for generating waveforms and adapt it to the one I've been given? How do I go about doing either of those things?


If anything I've said sounds completely ******ed, it just goes to show how out of my depth I am here, so absolutely any help is more than appreciated to save me from being completely ****ed.
Jmz123 is offline   Reply With Quote
Old 10-14-2012, 02:08 PM   #2
Aralingh
Intelligent person
 
Aralingh's Avatar
 
Join Date: Mar 2012
You should read some guide about specifically programming micro-controllers, possibly the one you have.

Programming is a HUGE area.

When we were studying controller programming, we actually had a specific guide for the specific controller we were working with.
Aralingh is offline   Reply With Quote
Old 10-14-2012, 02:09 PM   #3
JimmyBanks6
Cant Steal Ma Santa Hat
 
JimmyBanks6's Avatar
 
Join Date: Jan 2009
Location: Ottawa, Canada
You sound way in over your head, why is your dissertation based on something you have no background on? Inb4 read thread, its a serious question, it doesnt make sense your in it imo.

Either way, you need to start from the basics, learn about: basic syntax; calling variables; for and while loops; if/elseif/else statements; echoing data; and functions.

(thats what i learnt in a 12 week class introductory class, not in a matter of days)

I now program in PHP not C. and am far more advanced then I was then.
__________________
Sell and Promote your music TuneHub!


wy is yer mad at muy gramhar fer?


Quote:
Originally Posted by jimmyled
jimmybanks youre a genius.


aparently i ar smrt?
Quote:
Originally Posted by dyingLeper
jimmybanks youre a genius


GO SENS GO
JimmyBanks6 is offline   Reply With Quote
Old 10-14-2012, 02:17 PM   #4
NunoSlash
Registered User
 
NunoSlash's Avatar
 
Join Date: Aug 2006
Hi
NunoSlash is offline   Reply With Quote
Old 10-14-2012, 02:30 PM   #5
Ultima2876
Registered User
 
Join Date: Apr 2008
Good luck, you're ****ed x_x
Ultima2876 is offline   Reply With Quote
Old 10-14-2012, 02:31 PM   #6
NemX162
Registered User
 
Join Date: Sep 2007
I don't mean to sound discouraging, but if you have never done any programming in your life, I don't see how you will be able to pull this off. As others have already said, programming is huge. It's one thing to program in a new language when you already know one. You understand program flow, useful algorithms, and common reserved words that you see throughout various languages. If you really want to pull this off, you need to learn C independently of your project, then take it on.
NemX162 is offline   Reply With Quote
Old 10-14-2012, 02:38 PM   #7
jazz_rock_feel
Micropolyphoner
 
jazz_rock_feel's Avatar
 
Join Date: Jun 2006
Location: Winnipeg, Canada
This is flat out impossible, it's as simple as that. I have around 6 months of programming experience and I wouldn't even know where to start with this. It will take you at least a month just to get completely learn and grasp control structure, if you really go balls deep, never mind programming a microcontroller.
__________________
I don't know what music theory is.


Soundcloud. Look at it. Or don't.
jazz_rock_feel is offline   Reply With Quote
Old 10-14-2012, 02:40 PM   #8
Aralingh
Intelligent person
 
Aralingh's Avatar
 
Join Date: Mar 2012
Well, I don't know why everyone is so discouraging. While programming IS huge, he's only asked to do a specific task for which he has one month. And it doesn't "seem" to be that hard either.
Aralingh is offline   Reply With Quote
Old 10-14-2012, 02:48 PM   #9
TJHague
Registered User
 
Join Date: Feb 2009
Again, sorry to sound discouraging, but that is going to be pretty freaking hard. Programming microcontrollers can be a pain in the butt (depending on the manufacturer and the quality their documentation). I have been programming for 5-6 years, and that does not sound like it will end up being an easy task. When is this project due? That would be the largest determinant of the appropriate course of action.
TJHague is offline   Reply With Quote
Old 10-14-2012, 02:53 PM   #10
MarauderNL
Registered Abuser
 
MarauderNL's Avatar
 
Join Date: Feb 2009
Location: The Netherlands
Dude, go to school and ask your teacher(s) and follow each class you can, even with that I don't see you pulling this off.

I have over 6 years of experience with C related languages and about a year in C but even I wouldn't have taken on that project.
Thing is, the field your dabbling in now (communicating with hardware directly) is very specific. I know absolutely nothing about that.

Now, as Aralingh stated, it might be a matter of throwing together bits and pieces of code here and there, that might be easy if you actually knew how to program...which you don't!

Have you been given any code samples at all?

I'd seriously recommend picking something else if that's at all possible...
The C language isn't exactly newbie-friendly, either. It involves learning some things that you don't have to worry about in more modern languages.
You might be better off dumping the project, taking the time to learn some basic Java or C# and then retry this project at a later date.
__________________
This is the part where you are supposed to be amazed by the awesomeness of my sig.

Last edited by MarauderNL : 10-14-2012 at 02:57 PM.
MarauderNL is offline   Reply With Quote
Old 10-14-2012, 02:55 PM   #11
LReiter
|.,xXx,.|
 
LReiter's Avatar
 
Join Date: Dec 2006
Location: Berlin, Germany
I teach C programming, but not to that extent. Good luck guy, I can help you with simple stuff but not the very complicated one
__________________
Quote:
Originally Posted by blue_strat
This is Germany we're talking about.


Germany


Quote:
Originally Posted by stoner179
Thanks alot. When i read the first sentence, i dont know why, but i laughed in the middle of my first class at tech school. You sir have made me look like a fool for the first and last time
LReiter is offline   Reply With Quote
Old 10-14-2012, 02:58 PM   #12
Aralingh
Intelligent person
 
Aralingh's Avatar
 
Join Date: Mar 2012
Quote:
Originally Posted by MarauderNL
Dude, go to school and ask your teacher(s) and follow each class you can, even with that I don't see you pulling this off.

I have over 6 years of experience with C related languages and about a year in C but even I wouldn't have taken on that project.
Thing is, the field your dabbling in now (communicating with hardware directly) is very specific. I know absolutely nothing about that.

Now, as Aralingh stated, it might be a matter of throwing together bits and pieces of code here and there, that might be easy if you actually knew how to program...which you don't!

Have you been given any code samples at all?

I'd seriously recommend picking something else if that's at all possible...


Honestly I think it's a matter of how well documentation is written. The programming structure in itself is not a confusing issue since it's pretty much "logical".

Basically, if documentation for controller is made for people who know the very basics or none, he won't have much a problem. If it's not, THEN he's screwed.
Aralingh is offline   Reply With Quote
Old 10-14-2012, 02:58 PM   #13
RRRone
Registered User
 
Join Date: May 2006
It can be done. There have been people out there that have gone from zero programming to making a simple iPhone app in like a month. It just takes dedication and lots of hard work.

Start by learning the basics of C. Understand the syntax and all the concepts like functions, data structures etc. Then move on to understanding the stuff thats specific to your microcontroller. To generate a waveform you'll probably need to program around a formula and it shouldn't be that hard. Of course you can ask around in different forums and use the internet for your help. It all depends on how badly you want to do it.

Last edited by RRRone : 10-14-2012 at 03:04 PM.
RRRone is offline   Reply With Quote
Old 10-14-2012, 03:02 PM   #14
2dor
I like pie :D
 
2dor's Avatar
 
Join Date: Mar 2007
Location: Romania
Hi. What type/make and model of microcontroller are you dealing with? I'm guessing a T.I. one..?
2dor is offline   Reply With Quote
Old 10-14-2012, 03:05 PM   #15
ironman1478
Registered User
 
ironman1478's Avatar
 
Join Date: Dec 2007
get "the c programming language" if you want to learn the basics. its basically all the C you need to get started in about 100-130 pags. its short and all the code is portable, which is not the case with some stuff online. then try to find some sources about actually programming for a microcontroller.
__________________
Quote:
Originally Posted by Meths
If there were 12th century popes alive today they'd be telling Rick Santorum to get out of the fucking dark ages already.
ironman1478 is offline   Reply With Quote
Old 10-14-2012, 03:17 PM   #16
captainsnazz
#coldcum #abrasam
 
captainsnazz's Avatar
 
Join Date: Jul 2010
Location: yorkshire
The great thing about programming being such a huge area is that you don't need to know everything to do one specific thing. There's no reason this will be particularly difficult other than your lack of experience.
Since this is quite time sensitive, don't bother getting a comprehensive book on learning C or anything. You're not looking to become a master programmer (at least not yet), you just need to program one thing, so just learn the things you really need. It'd probably be a good idea to start with some basic hello world programs and learning control structures (if, for, while etc) and whatnot and then start on your application immediately and learn as you go along.
I'd say about half of programming is googling. You'll probably be able to piece it together from stuff that already exists, it's just knowing how to do that, which is why you need some basics.
__________________

Quote:
Originally Posted by lemmyisgod97
If they didn't want to be objectified they shouldn't have been little sluts.

Ego Sig

Last edited by captainsnazz : 10-14-2012 at 03:20 PM.
captainsnazz is offline   Reply With Quote
Old 10-14-2012, 03:22 PM   #17
2dor
I like pie :D
 
2dor's Avatar
 
Join Date: Mar 2007
Location: Romania
Quote:
Originally Posted by 2dor
Hi. What type/make and model of microcontroller are you dealing with? I'm guessing a T.I. one..?


http://www.csulb.edu/~hill/ee470/Si...e_Generator.pdf mighe be a good starting point

or

http://www.datasheetarchive.com/pur...rdatasheet.html (most are in assembly language though)

...but it all comes down to what controller you're working with.

Hope some of this helps...if not, hey, you'll have good reasons to start learning C/assembly.

Best of luck.
2dor is offline   Reply With Quote
Old 10-14-2012, 03:23 PM   #18
Jmz123
Registered User
 
Jmz123's Avatar
 
Join Date: Feb 2006
For those who are vaguely interested, I'm a medical student but in the UK in your 3rd year you have the option to do a different degree for a year. I'm doing medical physics and got landed in the digital electronics department. Hence why my project is like this.

Well most of these comments have confirmed my suspicions that this is a complete waste of time. God knows why I got given it in the first place, I did even say when I applied that I had no programming experience.

Oh well, thanks for the help
Jmz123 is offline   Reply With Quote
Old 10-14-2012, 03:23 PM   #19
JimmyBanks6
Cant Steal Ma Santa Hat
 
JimmyBanks6's Avatar
 
Join Date: Jan 2009
Location: Ottawa, Canada
Quote:
Originally Posted by captainsnazz
The great thing about programming being such a huge area is that you don't need to know everything to do one specific thing. There's no reason this will be particularly difficult other than your lack of experience.
Since this is quite time sensitive, don't bother getting a comprehensive book on learning C or anything. You're not looking to become a master programmer (at least not yet), you just need to program one thing, so just learn the things you really need. It'd probably be a good idea to start with some basic hello world programs and learning control structures (if, for, while etc) and whatnot and then start on your application immediately and learn as you go along.
I'd say about half of programming is googling. You'll probably be able to piece it together from stuff that already exists, it's just knowing how to do that, which is why you need some basics.

Scratch googling and put in "stackoverflowing"
__________________
Sell and Promote your music TuneHub!


wy is yer mad at muy gramhar fer?


Quote:
Originally Posted by jimmyled
jimmybanks youre a genius.


aparently i ar smrt?
Quote:
Originally Posted by dyingLeper
jimmybanks youre a genius


GO SENS GO
JimmyBanks6 is offline   Reply With Quote
Old 10-14-2012, 03:33 PM   #20
2dor
I like pie :D
 
2dor's Avatar
 
Join Date: Mar 2007
Location: Romania
Quote:
Originally Posted by 2dor
http://www.csulb.edu/~hill/ee470/Si...e_Generator.pdf mighe be a good starting point

or

http://www.datasheetarchive.com/pur...rdatasheet.html (most are in assembly language though)

...but it all comes down to what controller you're working with.

Hope some of this helps...if not, hey, you'll have good reasons to start learning C/assembly.

Best of luck.


..or you could give this a shot:

Google : "Programming microcontrollers in C" by Ted Van Sickle. It's a 470 page PDF that goes over some Motorolla controller programming notions in C and some examples.
2dor is offline   Reply With Quote
Reply


Thread Tools 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



All times are GMT -4. The time now is 01:52 AM.

Forum Archives / About / Terms of Use / Advertise / Contact / Ultimate-Guitar.Com © 2014
Powered by: vBulletin Version 3.0.9
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.