why would it not be 32 like it says ? 0b100000 = ANE0I'd like to use E0:
why would it not be 32 like it says ? 0b100000 = ANE0I'd like to use E0:
Warning I'm not a teacher
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Note to the next guy:
You don't need the register if there's only the ADC channel inside it (I keep the list only as documentation for the channel numbers).
Code:'ADPCH = %00000000 ' ADC POSITIVE CHANNEL SELECTION REGISTER ' bit 7-6 Unimplemented: Read as ‘0’ ' bit 5-0 ADPCH<5:0>: ADC Positive Input Channel Selection bits ' 111111 = Fixed Voltage Reference (FVR) ' 111110 = DAC1 output ' 111101 = Temperature Indicator ' 111100 = AVSS (Analog Ground) ' 111011 = Reserved. No channel connected. ' • ' • ' • ' 100010 = ANE2 * 16F18877 only ' 100001 = ANE1 * 16F18877 only ' 100000 = ANE0 * 16F18877 only ' 011111 = AND7 * 16F18877 only ' 011110 = AND6 * 16F18877 only ' 011101 = AND5 * 16F18877 only ' 011100 = AND4 * 16F18877 only ' 011011 = AND3 * 16F18877 only ' 26 ---> 011010 = AND2 * 16F18877 only ' 25 ---> 011001 = AND1 * 16F18877 only ' 011000 = AND0 * 16F18877 only ' 010111 = ANC7 ' 010110 = ANC6 ' 010101 = ANC5 ' 010100 = ANC4 ' 010011 = ANC3 ' 010010 = ANC2 ' 010001 = ANC1 ' 010000 = ANC0 ' 001111 = ANB7 ' 001110 = ANB6 ' 001101 = ANB5 ' 001100 = ANB4 ' 001011 = ANB3 ' 001010 = ANB2 ' 001001 = ANB1 ' 001000 = ANB0 ' 000111 = ANA7 ' 000110 = ANA6 ' 000101 = ANA5 ' 000100 = ANA4 ' 000011 = ANA3 ' 000010 = ANA2 ' 000001 = ANA1 ' 000000 = ANA0
You only need to declare the channel in the ADCIN command:
Code:ADCIN 26, ADCinput
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
I think this was always the case with the integrated ADCIN command of the PBP.
Then you can always mess with the registers if your are brave enough!
Ioannis
Bookmarks