Mijn winkelwagen
0 productenUS$ 0,00

Support Page Artificial Intelligence Book

Artificial Intelligence!

On this page you'll find all the software which is discussed in the Artificial Intelligence book. All software is free of charge, you do not have to pay anything to download and use it.

Reselling of the software is prohibited, check the license agreements for more information.

The software is intended for Windows XP, or similar Microsoft(TM) operating systems. Follow the instructions with care! Especially if this is new to you it is important to follow the steps exactly.

 

Installation instructions:

  1. Download the complete package here (click with the right mouse button, choose 'save as', the file is approximately 7 Mb).
     

  2. Save the package to your c drive in the root directory c:\ (Once you have verified that everything works as it should, you could move the package anywhere you want. By starting out in c:\ on the c-drive you do not need to change configuration files, everything is pre-configured).
     

  3. Unzip while maintaining the directory structure, (use "extract to here") you will need about 16 Mb of free space available (If you don't own an unzip program you can download one herefor free. You can also go to the official website of Winzip and download a paid version).
     

  4. Run the setup program in the c:\picai\boek\setup directory (This will install some dll and ocx files required by some of the additional programs. You can accept the default directory or choose one yourself. Verify that the path is indeed c:\picai\boek\setup. If it isn't you have performed either step two or three incorrectly, and the software will not run correctly should you choose to continue anyway.)
     

  5. In the book the Wisp628 programmer is discussed. Meanwhile a newer version, the Wisp648, has been released. For the programs in the book it doesn't make any difference which model you purchase. If you intend to connect the de Wisp628 programmer to another port than port 1 please read the "Frequently asked questions" section for instructions (if you use port 1 you do not need to take any action, so you're done with the installation).
     

  6. Time to get started! Read the tutorial in the Artificial Intelligence book (and discover the fascinating world artificial intelligence and machine learning).
     

  7. Check out the Hardware section below so you can download the latest and most up-to-date versions of the datasheets directly from the suppliers. Downloading the datasheet is not a requirement to work with the book, all relevant pages are in copied in the book itself.
     
    Note:

The directories c:\picai\projecten\gereed and c:\picai\projecten\lopend are empty. You can use these directories to store your own projects. I recommend that you use a separate subdirectory for each project to store or information relevant to that projects. For example documents, JAL sources, pictures, articles on the subject etc.

 

Changes, additions


If you use the Wisp648 instead of the Wisp628 the following changes apply to you:

  1. Everywhere in the book read Wisp648 instead of Wisp628.
  2. A separate stabilized power supply is no longer necessary: you can use the stabilizer of the Wisp648. The DC transformer or Wall Wart that you need to connect to the Wisp648 has to be 9..18 volt DC. If you use the built in power supply you cannot connect other power supplies to your breadboard at the same time.
  3. The programmer dongle is no longer needed: use the jumper on the Wisp648 instead. Do remember to remove the jumper after use!

 

Errors

None.

 

Required hardware

Using this bill of materials you can purchase the required hardware for this book. For the 16f877 you can use the A version or the non-A version. Note that you need to use the 16f877A_bert library for the A version and 16f877_bert for the non-A version.

For your convenience internet shop Voti has a special hardware package for you as reader of this book, that you can order here. In it you will find a selection of parts which enable you to make a large part of the projects in the book Voti is a reliable Dutch webshop which specializes in PICs and other electronic parts.

If you want to use the programmer that is described in the book, the Wisp628 or the newer model Wisp648 you can only order it at Voti. For the projects in this book it doesn't matter which of these two programmers you select.

 

Tip 1 
Put a sticker underneath each pic with the type (including the A if applicable). This way you will still know what it is, even when the ink on top has faded.

 

Tip 2 
If parts don't fit in the breadboard (for example variable resistors or speakers) solder short wires to it.

 

Links to manufacturers for datasheets and other information

Microchip Technology Inc (manufacturer of PIC microcontrollers and auxiliary equipment). On this website you can search and download the datasheets for the PICs that you use. Often some numbers will be replaces by an X to indicate that the datasheet describes multiple types. For example 16f87X for 16f877. Note that the A and non-A versions have some small difference. The microcontrollers used in this book are:

12f675
16f877 of 16f877A

 

Emerging Display Technologies Corporation (manufacturer of LCD displays).

 

Dallas Semiconductors (manufacturer of RS232 and memory chips). You are looking for this datasheet: MAX220-MAX249.

 

Philippe (Philo) Hurbain (data of Lego motors)

 

Daventech (manufacturer of ultrasonic sensors)

 

ON Semiconductors (manufacturer of mosfets)

 

Hitachi (LCD displays). Here you can download the general datasheet. If the LCD display you purchased is compatible the datasheet will contain all relevant information. You are looking for this datasheet: Hitachi HD44780U LCD Controller

 

 

Frequently asked questions (FAQ)

0. Figure 6 of chapter 2 in color:

Orange (left), blue (center) and yellow (right) throats of the Uta Stansburiana lizard. Picture: Barry Sinervo of the University of California, Santa Cruz, used with kind permission.

 

1. Is there a difference between the 16f877 and the 16f877A

Yes, but most differences are internal, so you won't notice them. The libraries however do note them, and therefore they are different. So for the 16f877 you need to use the 16f877_bert library and for the 16f877A the 16f877A_bert library.

 

2. I can't read the writing on the PIC anymore, so I don't know of it is a 16f877 or a 16f877A.

The best thing to do is put a sticker on the bottom of a PIC when you purchase it. It's a bit too late for that now, so put the following program in your PIC:

-- JAL 2.1 
include 16f877_bert 

var volatile byte CMCON at 0x9C 

-- define variables 
var byte resist 

forever loop 

cmcon = 7 
resist = 
0 
resist = cmcon 

serial_sw_write(resist) 
delay_100ms(
1

end loop

Start your terminal program in the PC. If you get seven as an answer the PIC is the A version, if you get a zero, it is the non-A version. The reason for this is that CMCON = 7 switches the two comparators in the PIC on. The non-A version doesn't have comparators, so the command fails. Note that in this case (as an exception!) you can use the 16f877_bert library regardless of the PIC you are testing (16f877 of 16f877A).


 

3. Did Bert van Dam write other books

Yes, but most are in Dutch. The PIC Microcontroller book was originally published in Dutch also, and translated due to an abundance of requests for an English version to the publisher. More information on Bert van Dam's books (and on him) can be found here.

 

4. I own Visual Basic 5.0 but some of the sources give a loading error on gauge.ocx

This is the control that takes care of the gauge in for example the voltmeter. Gauge.ocx is on the Visual Basic CD but it is not automatically installed. Download this package, unzip it, and follow these instructions:

1. Copy gauge32.ocx to a suitable directory, for example

c:\windows\system32

2. Add gauge32.ocx to the registry by executing this command (in "run" under the start button)

regsvr32 c:\windows\system32\gauge32.ocx

3. Add the development license by executing this command (in "run" under the start button)

vbusc.exe

The sources in the download package will now work. If you want to use gauges in your own programs add the ocx to your projects using 'add components'


 

5. I moved JALedit to another directory and now it doesn't work anymore. The program hangs and gives strange errors. I did adapt the directories in the settings of JALedit.

JALedit can't handle long directory names or names with a space. Keep the names short and make sure they contain no spaces. This applies to the directory of JALedit itself, but also to the ones it uses, such as the directory of the libraries, JALv2, the support files, your sources.

 

6. Where can I get the most recent version of JAL.

The easiest way is to download a starterpack. This contains the latest versions of JAL, JALedit, the _bert libraries and all support files. If you use a new version make sure to use all files in the starterpack, not just upgrade an individual file. By using all files you can be sure you have a fitting and working combination.

1. Download the most recent starterpack here (the download is at the top of the page). Follow the instructions of the starterpack to set up a separate development environment at c:\PICjal. This is convenient when the new JAL version is not completely backwards compatible.

2. Start JAL edit, and adapt the settings according to your notes of step one (if required).

 

7. My program doesn't compile, and I get Windows error messages.

There is a space in the name of your program, or in the path,. Keep the names short and make sure there are no spaces in them. This applies to the directory of JALedit itself, but also to the ones it uses, such as the directory of the libraries, JALv2, the support files, your sources.

 

8. I don't want to connect the Wisp programmer to com port 1 but to another port.

Open JALedit and select the menu options "Compile", "Environment Options","Programmer". The bottom line in this window is currently

go %F

Change this to

port X go %F

where X is the number of the port you use. For example: if you connected the Wisp programmer to com port 4 the bottom line would read port 4 go %F (note the space between port and 4).

 

9. I want to simulate my programs before I put them into a PIC, is that possible?

Yes it is possible; with a program called PicShell. With this program you can write and download sources to your PIC, but you can also simulate them on-screen. Check the PicShell page regularly and download the most recent version. The program is in development but already very powerful!

 

10. Which file do I need to use in the VB directory.

If you want to use the program you can double click on the file that ends with .exe If you own Visual Basic 5.0 you can modify these programs yourself if you want, in that case you need to double click on the file that ends with .vbp

 

11. I want to use the SRF05, what do i do with the "node" connection?

The SRF05 is a newer version of the SRF04. It can measure larger distances and has an LED to visualize the pulse. For the projects in this book the SRF05 must be used in the compatibility mode which means the "node" pin must not be connected (an internal resistor will pull the pin up for you).

 

PIC microcontroller links

  • Many JAL users are a member of the Yahoo JAL group, and subscribed to the mailing list. This is the ideal place to discuss JAL programming, and pose questions you might have. There is a friendly and open atmosphere, also towards beginners. Please note: the group is international, the mandatory language is English!

 

  • User with a website can become a member of the JAL webring.

 

  • For microcontrollers in general you can find a lot of information on the piclist. It comes with an extremely active mailing list.

 

  • The latest version of JAL V2 can be obtained at the JAL v2 homepage. The easiest way is to download the latest version of JAL however is by downloading a starterpack. This contains the latest versions of JAL, JALedit, the _bert libraries and all support files. If you use a new version make sure to use all files in the starterpack, not just upgrade an individual file. By using all files you can be sure you have a fitting and working combination of files.

SERVICE