Thanks for putting together such a great book!!

34 views
Skip to first unread message

Alden Tyrell

unread,
Jul 7, 2015, 7:19:10 AM7/7/15
to pic24-assemb...@googlegroups.com
Bryan,

I recently purchased your book and absolutely love it!!  Your book has solved a huge amount of problems for me and provided me with a great road map up to USB interfacing.  I'm not sure if my story will help you write a better edition, but it might be helpful to somebody, so here goes. 

I've been trying to master microcontroller programming for years and have always run into some sort of a hitch that prevents me from advancing into more sophisticated projects.  I started out with the PIC 16F84 dinosaur a few years ago, because it has a simple architecture with ample documentation, and never got past 16x2 LCD interfacing.   Amazingly, just about every book written about the 16F84, and there are tons, is ripe with fatal errors!  How could I have known? After much frustration, I switched over to ATMEL 8 bit AVR after I found a great book on assembly language from Timothy Margush.  Tim's examples actually made sense and compiled!!  No more bank switching for me or MPLAB 8! 

Margush took me pretty far, but I never figured out how to get anywhere with the C language in the Atmel domain.  Dave Jones, a blogger famous for his candor, boasted that you need to be the Linux penguin to set up a work environment with  the Atmel IDE, if you are going to program in C. I took his advice to heart because I couldn't figure it out either and basically gave up.   Up until recently, I was begging in the Microchip forums for help setting up a terminal for visual interaction with my projects.  I'm one of those guys that learned the hard way printf() will not print text in a terminal.   I also learned that the Microchip forums have critical rendering errors in the framework.   Figuring out why printf() and scanf() don't work took me on a year long tangent deep into manipulation of character strings; basically, I spent a year learning the C language for Unix based systems just to get my foot in the door.   Learning the C language for foreign applications didn't hurt me but it did take up a lot of my time and probably wasn't the most pedagogically sound approach.  I've also tried some third party starter kits, but they really aren't worth mentioning because, generally,  the code is onerous and difficult to modify.  Thanks again for writing such a great book that basically solves most of my problems!

Your book and your excellent coding skills have really showed me how it is done.  While, walking through the examples in your book, the only problem that I ran into was with my target.  I kept getting compilation errors and it appeared that I was trying to compile for the wrong processor.   I purchased the MIkrostick II and made sure that the processors were listed in the included files.   Eventually, I figured out that I needed to delete the Linker File associated with the processor you originally compiled the projects with. 

Like I said originally, your book is great but it does leave me with some difficult questions.   Figuring how to interface with USB protocols isn't impossible and I'm sure it will come to me eventually.  What really perplexes me is how you wrote such a good book?  I see that you used Doxygen and I have absolutely no clue how to set it up or if I should use it to create my own libraries.  I also see that you used python to scan datasheets.. now that's awesome.  In short, I want to learn sound coding practices and have a well documented and organized tool box at my disposal.  For example, if I want to use a five volt PIC24 for a project that will be interfacing with USB, where do I start?   Do I adopt and modify somebody else's code or attempt to port yours?   Should I walk through every feature and draft my own functions?   How would an expert like yourself start from scratch?  To me, this is the all important question. 

-Mike




Jones, Bryan

unread,
Jul 8, 2015, 11:40:30 AM7/8/15
to pic24-assemb...@googlegroups.com
Alden,

Thanks for your thoughts. My best coding practices/books:
- Test-driven development for Embedded C, James Grenning
- Practical UML statecharts in C/C++, Miro Samek
- Use Doxygen. Better yet, use literate programming. See https://pythonhosted.org/CodeChat/.

For USB, use a vendor-supplied library. It's too complex to write on your own.

Hope that helps!

--
You received this message because you are subscribed to the Google Groups "PIC24 Assembly-to-C Book" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pic24-assembly-to-...@googlegroups.com.
To post to this group, send email to pic24-assemb...@googlegroups.com.
Visit this group at http://groups.google.com/group/pic24-assembly-to-c-book.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages