mtg 1: DC circuits html
mtg 2: Handy Cricket
lab 2 html
mtg 3: LogoChip
lab 3 lab 3 html
Lang Ref pdf
PIC 16F876 docs pdf
mtg 4: Project Ideas
assignment 4 html
mtg 5: Bus Projects
lab 5 html
mtg 6: PCB and CAD
lab 6 html
EAGLE home page
EGX-300 Manual pdf
tangible bricks html
project plan html
PCB tutorial html
project report html
Doll Talk pdf
Clay illustration pdf
Navig. Blocks pdf
Cognitive Cubes pdf
Physical Programming pdf
Folk Computing pdf
LogoChip Bus Version
The LogoChip virtual machine has been extended to include background bus receive. Also the bus transmit (bsend) primitive works properly now.
There is a new version of the LogoChip code. Download the ZIP archive here.
After unzipping, go into the "vm" folder and run the "ASM-LOADER" project. Click on the "assemble filename" button. You should see a display of the code size in the main window.
Next, hook up your LogoChip to the serial line, and power it on with the Run/Stop button held down. You should not see a boot flash.
Now, click the "load-asm" button on the ASM-LOADER screen. The button should stay in a "clicked down" state while the code downloads. You should also be able to see the green serial status LED on the UML305DEV board flashing during this process. If it completes without complaining, it worked.
Power on your LogoChip again, this time not holding down the button. You should see the boot flash. You can now run the "LC LOGO" project from the ZIP archive. Do not use the originally installed LC LOGO project anymore.
Port B0 (pin 21) now acts as a bus send and receive pin.
Note that the bus requires a 1K resistor pullup to +5v to work properly. If you are using LogoChip as a bus slave and a Handy Cricket as the bus master, you do not need to add the pullup, because the Handy Cricket already has it.
On the other hand, if you are using LogoChip as a bus master to talk to some other bus devices, then you need the pullup.
The following new Logo primitives are available:
You must not write bit 0 of the Port B Data Direction Register to a zero. If you do so, the LogoChip will crash the bus, and no bus communication will be possible.
In this sample project, a Handy Cricket is the bus master and the LogoChip is the bus slave. There are three primary steps:
Step 1: Wire the Handy Cricket Bus to the LogoChip Bus. This is easy if you build the cable properly. There are three sub-steps here: (a) inserting the crimped wires into the bus plug housing right-side up and not upside-down, (b) getting each wire into the correct location in the four-position bus plug, and (c) stripping and tinning the open wire ends so that they may be reliably inserted into the solderless breadboards.
Step 1a: Inserting a Crimped Wire into the Jack Housing. The figure below shows top and end views of the crimped wire and a 2position housing. Notice the tiny locking leaf on the edge of the connector "U". This leaf should be visible through a slot in the plug when it is inserted. Look at the AFTER INSERTION drawing specifically. Notice that you can see the locking leaf through a slot in the plug.
Step 1b: Inserting the Ground and Bus Signal Wires. The photograph shown below (enlarged for clarity) shows the correct position of the black ground and white bus signal wires in the 4position bus plug. The bus plug is held so that the locking leafs can show through. From left to right, with the wires coming in from the bottom, the order is: black wire, empty slot, white wire, empty slot.
Step 1c: Stripping and Tinning the Wires. This step prepares the wires for reliable insertion into the solderless breadboards. Strip about 1/3 of an inch (about 0.5 cm) of insulation from the ends of the wires. Then twist each wire end (individually) into a tight braid. Then apply solder to the exposed braid, letting it infuse into the tiny wire strands, making a solid single bundle. Clip any excess solder ball from the end of the wire.
The cable is now ready to use! Insert the plug the into the Handy Cricket bus jack. Insert the black wire a ground in your LogoChip circuit. Insert the white wire into Port B0 (pin 21) of the LogoChip.
Step 2: Send a Command Word from the Handy Cricket. We will choose device class ID of $80 (decimal 128) for our example. So the Handy Cricket needs to send $80 marked as a command word to the LogoChip slave. It does this by sending $100 plus $80 or $180.
For demonstration purposes, put the command bsend $180 beep into the Run This line of the Handy Cricket, and download. Now each time you press the Cricket's Run/Stop button, it will send the command word $80 and beep.
Step 3: Receive the Command Word from LogoChip. The LogoChip should wait until a word comes in on the bus, and then check it to see if it's the magic code $180 (i.e., the value $80 marked as a command). If so, it will flash.
Code to do this is:
to slave waituntil [newbus?] if brcv = $180 [flash] slave end
Run this code on LogoChip. Now, press the button on the Handy Cricket. LogoChip should flash!
Your TurnYou now have the tools required to create your own LogoChip-based bus slave. For more information about typical protocols, see the documentation for the LED Number Display and the Handy Cricket Bus Overview.
Main LogoChip SiteHere is the main site for LogoChip.
Last modified: Monday, 03-Mar-2003 13:49:09 EST firstname.lastname@example.org