Ylan Iacobovici

MC9RS08KA2 A/D conversion issues

Discussion created by Ylan Iacobovici on Mar 29, 2007
Latest reply on Mar 30, 2007 by cjcarpenter cjcarpenter
Hey guys,
  This is probably the 5th post I've written on this stuff but I have been having a lot of issues with my A/D conversion on my board. I got most of the code from AN3266 and that took a while to fix and debug and when i finally hooked it up to my board and ran the code, the "device is reset." During the "configuration of the system" code, I am enabling the SOPT and COP with the code
MOV #((SOPT) >> 6 ) & $FF,PAGESEL
MOV #(mSOPT_COPE | mSOPT_COPT | mSOPT_STOPE), (((SOPT) & $3F) + $C0)
When I have this code in the program the device gets reset but when I take it out the code can run all the way until I get to a wait statement. Does anyone have any ideas to why this would have happened? Thanks