We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I'm a novice user, so apologies if this is a stupid question! I'm interfacing a video chip to the C167CR. To load the pallete table inside the chip a register (address 0x10) is written with the address. The following three registers 0x11, 0x12 and 0x13 then are written with the required data. The access to 0x13 increments the address, eliminating the need to reload it each time, thus allowing an efficient access to the internal table of registers. The problem is that when I write a char to 0x12, the address register is incremented as if 0x13 had been written. Other info.. The registers are actually at 0x80010 to 0x80013 and are accessed with an xhuge char pointer. The bus is 8 bit demultiplexed. I've 'fixed' it by re-loading the address in 0x10 after writing to 0x12, prior to writing 0x13; which suggests it is due to a word access being carried out. Any suggestions of what's going on and how to work around it? Many thanks in advance. Andy
Hi Andy, There are a few things that can go wrong: 1) An error in the program. Say, a word access to the register instead of a byte one. 2) Incorrect configuration of external bus interface, so that it does not satisfy timing diagrams for video chip register accesses. 3) You may have misunderstood some things in the video chip's manual. The manufacturer might hide important things somewhere in fine print making it difficult to figure things out. I think you need to use an oscilloscope here to make sure that the microcontroller generates signals that the video chip expects. Then you'll have to make sure that the video chip behaves accordingly. Unless you find your mistake somewhere in the process, it's a bug in the chip (and we know it's highly unlikely.) Regards, - mike
Mike, Thanks! The code is a byte access:
EXTS R5,#01H MOVB [R4],RL1