Thumbwheel click
From MikroElektonika Documentation
Thumbwheel click is a mikroBUS™ add-on board with a 10-position rotary sprocket
connected to a 1-Wire 8-Channel Addressable Switch.
Thumbwheel click
Features and usage notes
The starting position of the switch is
marked with a small notch on the PCB
above the wheel. Printed numerals from 1
to 10 clearly mark each position. The
thumbwheel has a crown with small
incisions for better finger traction. The
board can use both a 3.3V or a 5V power
supply. The One-Wire signal can be sent
either through the mikroBUS AN or
PWM pins. You choose which one by
soldering the GP SEL jumper into the
right position.
Schematic also available in PDF (http://cdndocs.mikroe.com/images/1/1c/Thumbwheel_click_sch
Thumwheel click is controlled through a
simple Dallas One-Wire protocol with
only three functions. There is a function
for configuring the registers, a function for reading the current position of the thumbwheel,
and a function for software reset. Hardware reset can be executed using the RST pin.
MikroElektronika compilers contain a One-Wire library that works with this click.
Programming
Thumbwheel click
IC/Module Thumbwheel, DS2408 8-channel addressable switch
(http://datasheets.maximintegrated.com/en/ds/DS2408.pdf)
Interface
1-Wire (OW1 or OW2)
Power
3.3V, 5V
supply
Website
The following code snippet reads the current position of the thumbwheel
www.mikroe.com/click/thumbwheel
(http://www.mikroe.com/click/thumbwheel)
1 char DS2408_ChannelRead()
2 {
3
int state;
4
5
while( Ow_Reset( &GPIOA_BASE, 0 ) );
6
7
Ow_Write( &GPIOA_BASE, 0, DS2408_SKIP_ROM_CMD );
8
Ow_Write( &GPIOA_BASE, 0, DS2408_CHANNEL_READ_CMD );
9
state = Ow_Read( &GPIOA_BASE, 0 );
return state;
10
11 }
Code examples that demonstrate the usage of Thumbwheel click with MikroElektronika hardware, written for mikroC, mikroBasic and mikroPascal for ARM,
AVR, dsPIC, and PIC are available on [Libstock].
Resources
- DS2408 8-channel addressable switch (http://datasheets.maximintegrated.com/en/ds/DS2408.pdf)
- Code example on Libstock (http://libstock.mikroe.com/projects/view/1869/thumbwheel-click)
- MikroBUS™ standard specifications (http://download.mikroe.com/documents/standards/mikrobus/mikrobus-standard-specification-v200.pdf)
Retrieved from "http://docs.mikroe.com/index.php?title=Thumbwheel_click&oldid=533"
◾ This page was last modified on 22 July 2016, at 15:12.
◾ Content is available under Creative Commons Attribution unless otherwise noted.
http://docs.mikroe.com/index.php?title=Thumbwheel_click&printable=yes
8/8/2016
很抱歉,暂时无法提供与“MIKROE-2366”相匹配的价格&库存,您可以联系我们找货
免费人工找货- 国内价格
- 1+289.34847
- 5+277.77869