This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129ENCPDT: ADCs on port K don't work

Part Number: TM4C129ENCPDT

I'm working on a project that is using a lot of the ADC ports. I have sensible values coming out of Port B, D & E, but port K isn't doing anything, even though it has the same setup code as the others. Obviously I've missed something. What's different about port K?

  • Hello Andy,

    I would guess there is a 'gotcha' with the initialization sequence. It can be painfully easy to miss something small, I know I've done so before. Can you post your ADC code for Port K so I can have a look through it and see? Plus I could test on my LaunchPad then too.

  • Hi Ralph,

    I've cracked it. The problem wasn't directly to do with Port K. The problem occurred when I was trying to configure an ADC sequence. What I hadn't spotted was that the #defines for the ADC channels are not sequential. They are from 0 - 15, but 16 (PK0) jumps to 256. In other words the channel defines go: 13, 14, 15, 256, 257, etc. So I had a loop writing the channel numbers into the sequence, which fell over when it got to 16.

    Thanks

    Andy