2005-11-02 12:18 PM
2011-05-17 03:08 AM
Good morning all,
I am using a uPSD3234 in the 80 pin package I am having trouble getting the ports A, and B to respond to programming, could you help me? I’m writing in assembler and here are the snippets of code I place the CSIOP in PSDsoft to $4000h to $40FFh Am I correct in thinking that it’s a MOVX command using the data pointer to address these ports? Many Thanks Paul Thomas (CSIOP_BASE = $40h DAT_OUT_A = $04h) this routine has the value for the port in the Acc. push DPL push DPH ;Save the current Data Pointer mov DPH,#CSIOP_BASE;Default port base address mov DPL,#DAT_OUT_A;Add offset for Port A output movx @DPTR,A;Load port A pop DPH pop DPL;Restore the current Data Pointer ret2011-05-17 03:08 AM
pbt1668,
You're doing essentially the right thing to write data to the port, but you need to set them up correctly beforehand. CSIOP+0x04 is the right address for the data, but you need to set them to MCU I/O mode using CSIOP+0x02 as well as setting the direction as output with CSIOP+0x06. Read up in the datasheet a bit more on these configuration registers and I think you'll be able to get it to work.2011-05-17 03:08 AM
Many thanks for the timely reply; I do set up the other registers at the beginning of the code.
I figured it was the code, or the setup in PDSSoft. Nice to be assured the code is right in its format. I’ll try the MCU I/O settings in the software. Once again Thanks Paul Thomas 8-) 8-) 8-)