JohnnyP wrote:
Gordon: Do you have a list of errors found in your text? I am using it to help port my old HC11 code, and I may have found a couple errors.
Page 361:
"When utilizing any of the port pins as a GPIO, the pin's associated bit in the TIOS register and the associated EDGxB and EDGxA control bits must all contain zeros."
Shouldn't that read OMx and OLx? I set up a test with TIOS=$FO, TCTL3=$FF, and the pins would change when I set and clear PTT8-5, but not when I turned on bits in TCTL1.
Page 430:
"For eight bit conversions, the result is placed in the high order byte of the sixteen bit result register..."
I couldn't read data unless I used the low order bytes, such as ATDD4RL
Message Edited by JohnnyP on 2006-12-2008:14 PM
JohnnyP wrote:
Gordon:
Thanks for taking your time to answer.
Yes, it's the 9S12C32, and I selected 8 bit res, right justify.
*****
So, if using PTx as GPIO, all the associated bits in TCTL1 or TCTL2, and TCTL3 or TCTL4 should be zero? AND THE TIOSx bit?
I want to use GPIO to set ouput pin PT6, configure TC6 to go low later, without having to wait around for it to happen.
Can't test now, but like this?
;Set PT6
BSET PTT, $40
BSET DDRT, $40
BCLR TIOS, $40
BCLR TCTL1, $30
BCLR TCTL3, $30
; Pin goes low after 10msec
LDD TCNT
ADDD #$1388
STD TC6
BSET TIOS, $40
BSET TCTL1, $20
do more stuffMessage Edited by JohnnyP on 2006-12-2008:14 PM
Gordon,
I have no idea if you are still monitoring this thread, but I am the new owner of Annabooks. I know publication rights have been returned to you, but I am getting inquiries on you book. Any chance you can contact me?
Regards,
Sean Liming