Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
If it is a parallel output ADC, you can just wire up the top 4 bits. For instance, only connect your micro to data bits 9:6. Leave the others floating.
If you read the data into a variable (from an integrated part, etc), just bit shift the data by 6 bits.
It's even easier than that, you can set the 10 bit A2D so that the highest 8 bits are in ADRESH and the lowest 2 are in ADRESL. This allows you to only use ADRESH as an 8 bit A2D.
Simply SWAPF the top and bottom nibbles over, and ANDLW it with 0x0F to mask off the upper 4 bits - result a 4 digit A2D result in the lower nibble of W.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.