REQUIREMENTS OF WORKING WITH LHFSD ED5RV07EN-15

GREEN LEAVES
LEARN HARDWARE FIRMWARE AND SOFTWARE DESIGN 5TH EDITION - FRONT COVER



The recommendation is, you should read this book in a relaxed manner, before anything else. There are no requirements to understand it, except for a little bit of logic, naturally. If you are an advanced HFS [Hardware Firmware Software] designer, you do not need to work with the accompanying Source Code: just use this book as a reference in your future designs. However, if it is your intention to learn from the ground up, and to experiment with all schematics and programs presented here, then you do need to prepare an little your HFS development workbench. Please be aware that the HFS activity could be fairly expensive to deal with, and you should plan to invest some time and resources into acquiring this exquisite knowledge.

Now, for Hardware Design, you need, first of all, a CAD [Computer Aided Design] “Schematic and PCB Editor” software program, and there are many interesting options for that. If you already have one, then use the one you are familiar with; if you do not have any, then you should go on the Internet and start with a search for “free PCB CAD software”. Have no fears, my friend, you are going to find your tool.

In order to reduce the HFS development costs, and to improve your design productivity, it is highly advisable to team up with one, two or more developers. In addition, note that the LHFSD book and the LHFSD-HCK PCB are both particularly suited for class teaching—this activity could be profitable enough to cover all the costs required to setup the firmware/software development workbench, and to manufacture a teaching set of LHFSD-HCK kits. Anyway, if you build your LHFSD-HCK or not, you still need to study this book, at least to find out of what is all the fuss about—right?

ATTENTION
In the fifth edition of LHFSD is suggested that the readers could use a prototyping breadboard for hardware design, instead of building a LHFSD-HCK PCB. This option reduces hardware design expenses, and it also simplifies things a lot. However, working with a prototyping breadboard requires increased attention to small details (as are the wire traces). Regardless, it can be done.
 

GREEN LEAFIn terms of the hardware needed for firmware development, Firmware Design part requires that you work with MPLAB® ICD3 programming tool, produced by Microchip Technology Inc. Naturally, you could use any other programming tool (ICD2, PICkit2/3); however, ICD3 is a very good investment because you have a Debugger and a Programmer in a single tool for a wide range of Microchip Flash controllers.

Up to edition 5 of LHFSD, it was suggested to work with MPLAB® ICD2 tool. We switched to ICD3 for the current edition, and our final conclusion is that ICD3 is way better than ICD2.
 

Considering the software tools involved in Firmware Design, Microchip offers their “MPLAB® X IDE VX.XX” [Integrated Development Editor] software for free download, which is quite a treat. In addition, in order to write and compile the FDx [Firmware Development] source-code programs, you need Microchip’s “MPLAB® XC16” compiler which is not cheap; you have to decide yourself if you buy MPLAB XC16 or not. The good news is, Microchip allows for a 60 days free trial period of a fully functional MPLAB XC16 once in your lifetime—a student version, though it is perfectly sufficient to work with all FDx programs. You should download your MPLAB XC16 copy only when you feel you are ready, and you do have the necessary time to work with it.

Software Design is implemented using Visual Basic 6 compiler, and you do need to get this excellent software tool. Although modestly expensive, Visual Basic 6 is one of the cheapest compilers available of the professional type. Used efficiently, it can help you write beneficial commercial products for many years to come. For example, the first four SDx [Software Development; “x” is the number assigned] applications in Part 3, Software Design, are everything you need in order to start developing a commercial product similar to the HyperTerminal™ one—and even way better!

It is your decision whether you want to work in Part 3 of this book with Visual Basic 5/6, or with .Net/2003/2005/2007/2012/2014. The best alternative of all is Visual Basic 6 since it is supported on Windows XP, Vista, 7, 8.1, 10. Further, a (technical) program developed with Visual Basic 6 is perfectly portable to Visual Basic .Net/2003/2005/2007/2012/2014 with only minor modifications.

MAPLE 7Over the years, the final “LHFSD.exe” program developed in Software Design, using Visual Basic 6, has been tested on Windows 95/98/2000/ME/XP/Vista/7/8.1: it works perfectly well on any of them! Again, the most important is to understand the design method presented, because practical implementations could be easily tailored to work on any Windows platform, and even on any other Operating System.

ATTENTION
In edition 5 of LHFSD we recommend that the SDx programs developed in Software Design are studied only as “programming techniques/methods”. This means, some readers may use VB6 to build the SDx programs, naturally, and each program is guaranteed to work without problems. However, other readers may use ANY SOFTWARE COMPILER THEY WANT in order to build programs that are similar to the SDx ones. It is perfectly possible, and everything should work perfectly well.

Please be aware that, lately (well, after 2007), Laptop PCs do not have DB9 connectors anymore: they work only with USB ports. If that is your case, you need to buy an “USB-to-Serialcable adapter”. Commonly, there are two types of USB/RS232 adaptors:
     1. built with Prolific® chipsets (used in ed. 1/2/3/4 of LHFSD book);
     2. built with FTD® chipsets (used in ed. 5 of LHFSD book).

ATTENTION
It is possible there are (or they are going to be) more chipsets on the market, than the two ones listed above. Consequently, you should implement similar adjustments as they are presented in details here. The main aspect to note is, the buffers of the USB driver need to be set to  the minimum size possible.

Now, the thorny aspect is that each USB/RS232 chipset behaves differently.


Fig R1 A Delock® USB/RS232 cable adapter employing a FTD chipset.Fig R1 A Delock® USB/RS232 cable adapter employing an FTD chipset.

MAPLE 7







Each adaptor costs around 10–15 EURO. However, each has some restrictions/limitations, therefore the readers need to be aware about them.
 


Fig R2 A Sabrent® USB/RS232 cable adapter using a Prolific chipset.
Fig R2 A Sabrent® USB/RS232 cable adapter using a Prolific chipset.



Naturally, there are way more types of USB/RS232 adaptors on the market. However, I want to present the problems I had with my adaptors, so that you know how to troubleshoot them.

GREEN LEAF

First of all, Prolific chipsets do not have drivers for Windows 8 at this time (October 2014); however, the FTD ones do work well an all Windows versions (XP/Vista/7/8). On the other hand, once you install the FTD driver (on any Windows version) you need to navigate to “Control Panel>Device Manager>Ports (COM & LPT)>USB Serial Port (COMx)”: highlight, right-click, and then select “Properties>Port Settings>Advanced . . .
 

Fig R3 Driver settings of Delock® (FTD chipset) USB/RS232 cable adapter.

Fig R3 Driver settings of Delock® (FTD chipset) USB/RS232 cable adapter.

If you work with a FTD chipset cable adaptor, your settings need to be as they are presented in the picture above; otherwise the adapter is not going to perform very well. In general, you need to reduce the size of the receive and transmit buffers to the minimum possible. In the picture above, the minimum buffer size is set to 64—which is too big, but that IS the minimum possible—1 byte sized buffers would have been far better.

Prolific chipsets have smaller buffers, though it is a very good idea to reduce them as well. The procedure to follow is identical. Navigate to “Control Panel>Device Manager>Ports (COM & LPT)>USB Serial Port (COMx)”: highlight, right-click and select “Properties>Port Settings>Advanced . . .” You should see something similar to picture R4.

Anyway, failing to customize you USB/RS232 adaptor appropriately may result in occasional erratic behavior—therefore your FDx/SDx applications may not perform to standards. Again, all FDx/SDx programs will function somehow, though not correctly, as they should.
 

Fig R4 Driver settings of a Sabrent (Prolific chipset) USB/RS232 cable adapter.

Fig R4 Driver settings of a Sabrent (Prolific chipset) USB/RS232 cable adapter.

If the readers work with Tower/Laptop PCs that do have DB9 connectors, all they need is a RS232 cable to connect their PC to LHFSD-HCK. The COMx port in this instance is physical, not virtual, and it may be easily discovered/identified in “Control Panel>Device Manager”.

GREEN LEAFNow, it is possible some readers may shy away thinking this RS232 serial communications interface is outdated, and they do not need to learn it anymore. Not so, dear readers. The RS232 application presented in this book is an excellent lesson, if you want to understand the basics of serial communications. In addition, all industrial controller applications (this is, mostly, the PLC systems) use RS232 working over USB, exactly as it is presented in our book.

Lastly, regarding your personal skills, you should know something about the basic notions of electronics, and it is preferable that you do have some idea about C and Visual Basic programming. Therefore, it is recommended to keep a few good C and Visual Basic programming books close to your hand, if necessary, while working with this book.

(. . .)


LHFSD - Front Cover






Learn Hardware Firmware and Software Design the easy way!

 
 
 
x
Send your comments regarding this page using support@corollarytheorems.com, noi@editcc.com, or cus@2agraph.com
Page last updated on: July 09, 2018
© SC Complement Control SRL. All rights reserved.
 

OUR CANADIAN FLAG

x
 

Valid HTML 4.01!

Site pages valid according to W3C

Valid CSS!

Stylesheets pages valid according to W3C
 
x