Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 11th August 2007, 11:25 PM   (permalink)
Experienced Member
 
jaydag71 is on a distinguished road
Default Please need a REALLY good tutorial or somethin!

hi again all, today am beyond frusterated- I have invested plenty of time into trying to learn pic assembly and also have had a crack or 4 at learning C in general, which I have managed to retain some of. My trouble is that I know not enough C do do any real good with a pic, and my asm is just pathetic! So, as you can all imagine I am pretty bummed out when I have a chunk of hardware I've worked on yet cannot do much of anything with it.

I really need a decent tutorial, lessons, whatever it takes to get myself learned properly and finally. I have searched all over, there is very very little in pic C tutorials I have found. I have found some decent asm tutorials but again I am just floundering with them-- they are all designed aroudn the pic16f84, which I do not use nor plan to. I've just spent the bulk of this afternoon 'porting' or adapting 16f84 code to my 16f876a and found it didn't work. Again, I really need some help here! anyone know of my fix and the link to:?

quit is no option, I've literally invested much much time into reading the datasheets and all that crap, I'm no quitter. AVR's, not really for me. help?

jd
jaydag71 is offline   Reply With Quote
Old 11th August 2007, 11:46 PM   (permalink)
Experienced Member
 
Papabravo is a glorious beacon of lightPapabravo is a glorious beacon of lightPapabravo is a glorious beacon of lightPapabravo is a glorious beacon of light
Default

Can you articulate anything at all with respect to what your actual problem is? Let's start with soemthing you do understand and something you don't. If we can build on something that you know then we have a shot. I certainly hope that you did not find Nigel's tutorials wanting. He will be distressed -- I'm sure.
Papabravo is offline   Reply With Quote
Old 12th August 2007, 12:15 AM   (permalink)
Experienced Member
 
Hero999 is a splendid one to beholdHero999 is a splendid one to beholdHero999 is a splendid one to beholdHero999 is a splendid one to beholdHero999 is a splendid one to beholdHero999 is a splendid one to beholdHero999 is a splendid one to behold
Default

http://computer.howstuffworks.com/c.htm
__________________
What's so bad about Microsoft?

Get Opera it's simply a superb browser.
Hero999 is offline   Reply With Quote
Old 12th August 2007, 12:24 AM   (permalink)
Experienced Member
toodles is on a distinguished road
Default

Happy to help, but you haven't given any indication where you're at or what problems you're facing. Are you going to be using C, if so, which one? Or are you going to be using ASM? Which PIC are you starting with? Have you made a blinky LED 'hello world' setup yet? Have you modified the 'hello world' to include using an input switch? Are you able to program and read back pics? Do you have a debugger or just a programmer? Are you able to use the MPSIM debugger in MPLAB? Is there something specific you want to make?

You've listed a bunch of vague reference of where you've been, but no details about where you want to go, or what's stopping you from going there.
toodles is offline   Reply With Quote
Old 12th August 2007, 01:21 AM   (permalink)
Experienced Member
 
jaydag71 is on a distinguished road
Default

hullo and thanks for the reply, yeah now that I've cooled off and had some dinner I can now better try to convey some of my frustrations,, I suppose the fact that I am also 4 days into quitting smoking cold-turkey hasn't been a help (surely my kitties agree).

As far as my software writing capabilities go, they are minimal. I've taken some time in the past to learn a bit of BASIC, have read a few C and Cpp lesson-books but seem to have a hard time retaining the lessons or something.

One of my favorites that I still reference is Learn C Now- an old C programming book from the 80's. It is a great starter book and still useful. Unfortunately it doesn't get into much specifics and also doesn't cover anything beyond the true basics. So, I know my basics of program structure, operators, expressions and statements, basic program flow control (if, while, case, etc.) can write some basic functions, very basic macros, a bit about pointers and arrays, unions, etc- most of the very basic stuff that is used in writting code for x86 platforms. I'm at about the same spot in both my C and cpp progress- I know enough to write some simple code but not enough to make it do anything useful!

Writing C or cpp for a micro I have no clue! I've often gone over others code blocks in an effort to gather some idea about writing my own- and the funny thing is that I am able to read through the bulk of it,, yet writing my own is an impossibility, if that makes any sense at all. I don't even know where to start.

ASM I would rather learn- I'd like to think that I'm capable, but the truth is that I've had some honest cracks at it and its never gotten past the first few lessons. I can make a LED blink, yippie!,, its about the equivalent to what I can write in C for x86! Again, I am able to read through others code much of the time- I usually understand ~80% of mid-range pic asm,, I haven't yet used any pic18's seriously. The instructions are no large mystery- I guess it is just putting it into context or something?

I have found out the really hard way that I learn better with examples I am able to rapidly implement- the more time and run around that I have to invest in learning something that more frustrated I become- its a major flaw but difficult to remedy.

I am trying to work with a bunch of pic16f's right now,, my staple (like many others) is the 16f876a/877a. I've build my own programmer, dev boards, sensor breakouts, etc- i have lots to play with once I am able to get coding proficiently. Up until very recently I have been relying on others' code for doing my experiments, but it is just cheating myself and not going to be much use for custom projects, robot firmware, etc, of which I have many that are just waiting for my coding skills to 'catch-up'.

I have not tried the Nigel's tuts yet I don't think- I could be wrong though because the name does ring a bell for me. link? geez- my bad -I do actually have it bookmarked- I just haven't used it yet! I'll check those lessons out!

I think I would be smarter to try the C again, but also do not want to give up with the assembly. Any ideas folks? thanks for the efforts--jd>> yeah I just verified that all of the tutorials I do have are asm oriented- I have 0 pic-C-programming tutorials,, I would benefit from having a good one- for the asm I think I have the best tuts already but just need to flounder-through them,,follow-thu.

Hullo 'toodles' ,, your post came in after I started this one so...

yeah I have no $$ to buy a C compiler- I have all the free ones, and demos for wingdows and also cpik under linux but haven't yet used it beyond simple LED blinker. My programmer is a simple serial jdm design,, I am planning to finish a ICD clone soon. I do use MPsim but have a hard time understanding its results oftentimes (like today). My projects are all robot oriented in some way- most are modular blocks which will eventually be integrated into a final bot project, but I would like to learn and experiment with them separately first! This is where I get stuck- I mean I can always find someone else who has played with what I am working with, and use their blocks,, but when it comes time to integrate I'm in more trouble.....this is about where I'm currently at I guess.

I suppose I need to invest even more time into finishing the lessons I already have-- but again I haven't had much luck with them yet and time is really passing. I'm ashamed to say how long I have been at it already, honestly. Maybe I have a learning disorder.....

Last edited by jaydag71; 12th August 2007 at 01:46 AM.
jaydag71 is offline   Reply With Quote
Old 12th August 2007, 03:28 PM   (permalink)
Experienced Member
 
ClydeCrashKop is on a distinguished road
Default

You still haven’t said what your specific problems are.
With ASM you just have to think small, one step at a time. Nigel’s tutorials are based on reusable subroutines. Would you want to start from scratch to display info on an LCD? It is not cheating, use them. All you have to do is glue the subroutines together to do what you want. There is a wealth of info and links in the first couple of topics in this forum.
__________________
C:\WHUT ?
Beware the asterisk *
ClydeCrashKop is offline   Reply With Quote
Old 12th August 2007, 03:30 PM   (permalink)
New Member
DavidT is on a distinguished road
Default

I documented some of the basics (C) that I picked up as I was learning. Some of the simple examples I have may help. The free versions of CC5X and BoostC will take you a long way.
http://www.flyelectric.ukgateway.net/pic1.htm
Regards, David.
DavidT is offline   Reply With Quote
Old 12th August 2007, 04:25 PM   (permalink)
Experienced Member
 
jaydag71 is on a distinguished road
Thumbs down

hullo and thanks for the reply! last night I started into the Nigel lessons- I'm still at the beginning so no problems yet.

I think that I was having a really bad day- things don't seem as bad this morning. I still do need help, but I think that what I really need is a good C for micros tutorial- something that will cover what the hurdles are when learning to program with C for a micro, when knowing nothing of C, or C for PC's- and what the major differences are between the two? I have decided to go back and re-do some of the later portions of the Learn-C-Now book I do have to re-learn about pointers,structures, bitfields, unions, macros, etc. I'm hoping that much will come back to me once I start referencing it again.

I want to learn the C because I plan to use more than PIC's, they are just what I have around and supporting hardware built already. I also have a few AVR's but the programmer I built for them is buggy and unrelyable so I tend to ignore them even though the software tools available are more robust and freely available.

I wanted to learn the assmebly for the PIC because it appeared to be the easiest way to get some asm under my belt (at the time),, not so sure anymore but again have invested too much time to turn back now! Its important to me to understand exactly what the firmware is doing inside these devices- what the C is hiding.

You are right in a sense, about not re-inventing the wheel by designing my own code for 'functions' which have already been covered to death,, but the reason why I have opted to go the hard route is because of my lack of understanding as to what is really going on in any particular block. Sure I could (and will) be 'glueing' blocks together to make up a larger firmware, but that is less than optimal no doubt, and is probably going to end up in many hard to diagnose bugs that will stop me cold because of my lack of understanding.

Well back to it- I'm going to have another hard crack at the ASM today and keep refreshing my C skills while looking for any pic C tutorials.
jaydag71 is offline   Reply With Quote
Old 12th August 2007, 04:54 PM   (permalink)
Experienced Member
mvs sarma is a name known to allmvs sarma is a name known to allmvs sarma is a name known to allmvs sarma is a name known to allmvs sarma is a name known to allmvs sarma is a name known to all
Send a message via MSN to mvs sarma Send a message via Yahoo to mvs sarma
Default

Quote:
Originally Posted by Papabravo
Can you articulate anything at all with respect to what your actual problem is? Let's start with soemthing you do understand and something you don't. If we can build on something that you know then we have a shot. I certainly hope that you did not find Nigel's tutorials wanting. He will be distressed -- I'm sure.
i feel that Nigel will be happy if some one uses his tutorial and develops his/her skills.

he won't be much bothered if a person finds otherways of learning.
the goal being one to learn and use assembly level programming before or while they use hifgher level languages.

Sarma
mvs sarma is offline   Reply With Quote
Old 12th August 2007, 05:30 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

Here are my link pages, lots of PIC tutorials and a couple of eBook links
http://www.blueroomelectronics.com/links.htm
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 12th August 2007, 08:04 PM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by Papabravo
I certainly hope that you did not find Nigel's tutorials wanting. He will be distressed -- I'm sure.
Not in the least!

My tutorials require work from anyone using them, they aren't an 'Dummies Guide to the PIC'.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 12th August 2007, 08:06 PM   (permalink)
Experienced Member
 
jaydag71 is on a distinguished road
Default

thanks David for the link to your efforts learning the C for pic. I am just starting into it right now as well as continuing with the Nigel tuts.

Anyone know of tuts which utilize opensource C compiler? I have pikdev ready to go. oftentimes 'porting' code examples between compilers has been a source of true frustrations and basically a waste in time and effort--would be nice to have some ready to use tuts with examples under an open-source of completely free and unrestricted compiler. This is the largest area where the AVR comes thru shining in my opinion.

anyways, back to it. thanks again all,, jd
jaydag71 is offline   Reply With Quote
Old 12th August 2007, 10:04 PM   (permalink)
Experienced Member
nickelflippr will become famous soon enough
Default

Great Cow Basic is a Pic open source compiler. Its not C, nor is it going have the great tutorials that you are looking for, although it has good examples and help files. Good luck with your quest !
nickelflippr is offline   Reply With Quote
Old 12th August 2007, 10:08 PM   (permalink)
New Member
DavidT is on a distinguished road
Default

It sounds like you're going C but you need to commit to one language initially and branch out later. I've just taught myself without ever having programmed before so I feel your pain! I think you will find the 'FED' guide I mention in item 1.10 on my site extremely helpful if you go C. If you've not got an LED flashing yet then that's the place to start.

I don't think you will find much code that does what you want, with your compiler, your PIC and in a style that you understand. So finding programs that are well commented are usually more helpful than being for your compiler. An active support forum is then helpful in bridging the gap.

I also needed to start off with a free compiler. I was prepared to pay 'hobby' prices once established but not full commercial. I quickly discovered once I got into it that I wanted to be able to choose PICs that had the features I wanted and were available from my suppliers so I did not want the compiler to then further limit my choice. Having tried many C compilers I've ended up with BoostC fulfilling my needs very nicely.
David.
DavidT is offline   Reply With Quote
Old 12th August 2007, 10:59 PM   (permalink)
Experienced Member
 
jaydag71 is on a distinguished road
Default

Thanks again for the replies! I was happy to see that there is an open source BASIC compiler now! I'll try it out as soon as I can download it (having problems with downloading right now, will try back later.)

Yeah I agree that I need to focus on learning the one language rather than taking on too much at once- at the same time it is tough to commit to one or the other- it seems like in the past whenever I have I've always ran into some reason why my choice was not the best one, so end up switching. Eventually I gave up and just started learning both asm and C. I started with the C before I even was thinking about micros- I had wanted to do PC programming for a while but eventually got into the micros and electronics- these days I much prefer the hardware side than the sw (obviously). Now is time to catch up.

things are looking better today so far- I've managed my way though some examples and believe that the info is being retained- for the short-term at least! I believe that is the real issue to be frank. thanks again guys,, jd
jaydag71 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
good online parts shop? ritayshida General Electronics Chat 8 25th December 2005 06:23 PM
Is $20 a good price for a P16PRO40 Programmer? Mike, K8LH Micro Controllers 11 5th July 2005 01:18 PM
Where to get Good Power Supplies? Megamox General Electronics Chat 10 25th May 2005 11:05 PM
Good intro to PICs... pwollner Micro Controllers 1 18th February 2004 02:37 AM
Need a Good and easy project of Cotrol !!! gravityforu Electronic Projects Design/Ideas/Reviews 1 12th December 2002 02:43 PM



All times are GMT. The time now is 03:53 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.