AMICUS18-COMPANION-SHIELD AMICUS, AMICUS18-COMPANION-SHIELD Datasheet - Page 16

Amicus18 Companion Shield

AMICUS18-COMPANION-SHIELD

Manufacturer Part Number
AMICUS18-COMPANION-SHIELD
Description
Amicus18 Companion Shield
Manufacturer
AMICUS

Specifications of AMICUS18-COMPANION-SHIELD

Silicon Manufacturer
Microchip
Core Architecture
PIC
Core Sub-architecture
PIC18
Features
USB Interface, In Circuit Serial Programming Interface
Kit Contents
Board
Silicon Family Name
PIC
Silicon Core Number
PIC18F25K20
Rohs Compliant
Yes
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
PIC18F25K20 Microcontroller
A more advanced program to do the same thing is shown below:
' Illuminate 4 LEDs attached to PortB in sequence
' Using a more advanced method
' Make sure the Amicus18 board’s jumper Q3 is set to the RB1 position
'
There are many variations of the programs that can be used with the four LED circuit. The program be-
low sequences the LED’s up then down the line.
' Illuminate 4 LEDs attached to PortB in sequence
' Make sure the Amicus18 board’s jumper Q3 is set to the RB1 position
'
Crownhill AssociatesLimited 2009 - All Rights Reserved
Dim bPortShadow As Byte
Dim bLoop As Byte
Low
While 1 = 1
Wend
Dim bPortShadow As Byte
Dim bLoop As Byte
bPortShadow = 1
Low
PORTB
DelayMS 300
While 1 = 1
Wend
bPortShadow = 1
PORTB
DelayMS 300
For bLoop = 0 To 3
Next
For bLoop = 0 To 3
Next
For bLoop = 3 To 0 Step -1
Next
PORTB
PORTB
bPortShadow = bPortShadow << 1
PORTB
DelayMS 300
bPortShadow = bPortShadow << 1
PORTB
DelayMS 300
bPortShadow = bPortShadow >> 1
PORTB
DelayMS 300
= bPortShadow
= bPortShadow
= bPortShadow
= bPortShadow
= bPortShadow
Amicus18 Companion Shield
Version 1.0
' Create a variable to hold the state of PortB
' Create a variable for the bit counting loop
' Make PortB output low (Extinguish all four LEDs)
' Create a variable to hold the state of PortB
' Create a variable for the bit counting loop
' Set the initial state of PortB
' Make PortB output low (Extinguish all four LEDs)
' Transfer the shadow variable to PortB
' Wait a pre-determined amount of time
' Create an infinite loop
' Set the initial state of PortB
' Transfer the shadow variable to PortB
' Wait a pre-determined amount of time
' Create a loop from 0 to 3
' Transfer the shadow variable to PortB
' Wait a pre-determined amount of time
' Close the loop
' Do it forever
' Shift a bit left one position
' Close the loop
' Do it forever
' Create an infinite loop
' Create a loop from 0 to 3
' Shift a bit left one position
' Transfer the shadow variable to PortB
' Wait a pre-determined amount of time
' Close the loop
' Create a loop from 3 to 0
' Shift a bit right one position
' Transfer the shadow variable to PortB
' Wait a pre-determined amount of time
15
06-10-2009

Related parts for AMICUS18-COMPANION-SHIELD