|
'***************Ato D for the 628***************
program A2D84
Dim data1 as Integer
'***********************************************
Sub Procedure GetValA1
TrisA = %00000000 ' Set all of the pins of PortA to output
data1 = 1 ' Set the data variable to one
PortA = %00001000 ' Pulse pin 3 of PortA for 5 ms
Delay_ms(5)
TrisA = %00001000 ' Get ready to suck in data
While PortA > 0 ' See how long it takes to discharge the 'capacitor
data1 = data1 + 1
wend
PortB = data1 ' Display the data on PortB
End sub
'***********************************************
Main:
TrisB = %00000000 ' Configure pins of PortB as output
TrisA = %00000000 ' Configure pins of PortA
CMCON = %00000111 ' Turn off that sill comparator
While True
GetValA1 ' Call the GetValA1 procedure
Wend ' loop it forever
End.
'***********************************************
|
Robodyssey Systems manufactures Robot Kits including Autonomous Mobile
Walking Robots, Wheeled Robots, Talking Robots, Expressive Robots, and
Social Robots. We also sell Robotics Accessories including Nexcell NiMH AA
Rechargeable Batteries, Nexcell NiMH AAA Rechargeable Batteries, Battery Holders,
Velcro Straps for Battery Packs, Battery Chargers, Robot Grippers, Hobby Servos,
Servos Modified for Continuous Rotation, Tail Wheels for all Rolling Robotic Platforms,
Polyurethane Skate Wheels with Servo Adapter Hubs, Sharp IR Sensors and Adjustable
Sensor Brackets, Sensor Cables, and Programming Cables. All of our Robot Kits
can be purchased as easy to assemble robot kits or as fully assembled stationary
or mobile robots. Robodyssey uses 1/8 inch aluminum and acetyl for most all of
our mobile robot components and robotics accessories. We provide classroom
training for teachers interested in integrating robotics, computer programming
and electronics into the classroom.
We hope you enjoy our web site. Feel free to use any robotic resources.
Robodyssey is your complete solution for Educational Robotics as well as Hobby Robotics.
|