Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Please need a REALLY good tutorial or somethin!

Status
Not open for further replies.

jaydag71

New Member
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
 
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.
 
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.
 
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:
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.
 
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.
**broken link removed**
Regards, David.
 
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.
 
Papabravo said:
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
 
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
 
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.
 
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
 
mvs sarma said:
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
I think you missed completely what I said. Try rereading it again and see if the meaning becomes clearer.
 
personally I think the Nigel tuts are pretty good from what little I have completed, they delve into things fairly fast tho, without much explanation but as he stated in his posting- they are not a Dummies Guide to the pic. (I do enjoy the dummies books that I own as well- they are a good fit :-I ). I think that I know enough about the pic architecture to get thru, but did have to deviate moentarily to gather info about asm directives right off the hop--

I think that even though I have invested alot of time into my learning efforts in the past, I may not have used that time well, so am now where I am- a not so good place to be, indeed.

I'll make it tho. regards, jd
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top