Jump to content

Swapping between words

Featured Replies

Hi everyone

 

I've had this project on controlling the light intensity with a microcontroller, using phase control. I've build the zero-cross detector and the circuitry to interface with the light via an optocoupler (MOC3023) and a triac (BT138), but I'm a little stuck on the software. I'm using an on-board potentiometer to control the intensity and a 12bit ADC to get the digital value, but I think I can easily complete by having an 8bit value.

So my point of concern is how do I change this 12bit value into an 8bit one?

Any help at all would be greatly appreciated :)

 

TDS

There isn't any conversion. Use the ADC's 8 MSBs.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.