Monday, 12 May 2008

Finally, the touchscreen works

In the end, i had to resort to buying a pre built controller. My board almost worked, but i didnt take into account the current drain and inevitible voltage drift. If i would have read the ads7843 datasheet a little more closely, i could have duped its functionality (especially the differential mode). the next thing i tried was to use a actual 7843, though i never could get it to do anything. I did learn about the SPI HW on the PIC18F though. The docs are kinda wrong. Note to readers, check the spp bit in the interrupt flags, do *not* ready the BF flag in sspstat. Doing so will halt the transfer! ( the interrup flag triggers weather or not interrupts are enabled for the ssp). Thankfully i have a logic analyzer. I would hyave been screwed without it. the other thing i learned was about USB. I brought up the mouse example and sucessfully modified it to report absolute mouse positions. Note, this was all firmware wrangling, the built in HID mouse driver in winxp/vista took care of the rest. pretty sweet actually. Having delved into usb, i feel more confident about rewriting microchip's usb "framework". which is a bit of a mess. next challenge, complete the kiln controller. all the parts are finally here. lessons learned:
  • expect the first board or design to fail.
  • always include a good voltage reference if using an a/d.
  • Make sure not to tax the output pins with devices that draw excessive current.
  • Always build in sampling pins to hook up the logic analyzer.
« May »
SunMonTueWedThuFriSat
    123
45678910
11121314151617
18192021222324
25262728293031