Hi I'm working on a design based around a RCM4010. One of things it has to do is receive a signal from an IR receiver. I have attached the demodulated output...
... Don't know why you used and interrupt. You could just as easily polled for the start. I would not write an interrupt using C with Dynamic C. The code is...
Scott, Thanks for the reply. The reason I use an interrupt is that the device is doing lots of other stuff, including polling buttons, receiving and...
Wouldn't it be "db 0x10,0x0", as djnz subtracts two from the jump instruction, so as to jump from the djnz command, not the next line? If I want to loop in...
Shawn- Recall that the processor needs to read in the DJNZ instruction before it can process it -- the "-2" is jumping back over the bytes of the DJNZ...
... When the instruction is read, the program counter is already pointing to the next line. So, -2 is needed to jump back to itself. The program counter is the...
Ops! In my case... just because i didn't figured out. I guess when you are going back and forward from high to low level languages there's a risk of over...
Ok, so @PC points the begining of the instruction *on this line*. That makes sense. I tried using that, and now I get what I expected all along--infinite...
Ah, found a missing byte. Still not where I need to be, but running w/o crashing anyhow... #define Delay6us $\ ld b,0x11 $\ djnz @PC #define Delay12us $\...
No, I don't want it to go there. I just want to kill time; if it goes back to load b, it'd be there--forever. The djnz command needs to loop on itself until...
... I wasn't asking as though it should head there; I was asking does the expressions @PC reference the first of the macro rather than each assembly statement?...
Let see... RnW_bit_test(data,bittest), at first sight: a. You use the bit instruction who affects Z flag but you don't check it. I guess in (mi list below) mem...
Given this code snippet: int var1, var2; var1 = 0; var2 = 1; var1 |= !var2; I'm trying to figure out why the value of var1 keeps coming out to be 5. Here is...
Since you are using integer variables, I believe you need to use the bitwise one's complement operator (~) instead of the logical negate (!) operator....
No, the bitwise operator would not work. That just changes 1's to 0's and 0's to 1's. I want the logical negate operator. I managed to get it to work by...
I gotcha. That does look like a possible bug, although using ints for bit flags always makes me feel guilty (all those other bits going to waste). Of course,...
Bit fields aren't directly supported in DC, but as I have done, you can create them using the BIT() function. Declare an unsigned long, then use each of the...
... Hi all, I an having an issue with the rabbit web update button. Sometimes it works on the first click from the browser, other times you have to click ...
Looks like a bug to me. The code generator appears to confuse the order of the instruction sequence (Optimization bug?) If the EX DE,HL instruction occurred ...
... That won't work in DC as you can not initialize local variables. You have gotten used to Softools ;) ... yes, this looks like a bug. ZW has not really...
Yeah, I didn't catch the missing "nz" in the jp statement until I posted that. I fixed that, and I think I have the jumps working correctly; it'd be great if...
One thing you can do, to check your jumps are OK, and to get a bit of insight into how the assembled code is working, is to simply use debug mode to step...
Ah, tried that, and it cleared up an issue, thanks. Never used breakpoints before, usually just pulse an unused bit, but I haven't figured out how to do that...
Ok, I want to set and clear bits, in particular on Port A, in assembly. Preferably, w/o reading port a, anding/or'ing in my value, and then writing it back to...
... PADR is an I/O port address, so you need to say use I/O try: ioi set 0,(HL) ioi res 0,(HL) Also, many of the rabbit regs are write-only, you cant read the...
Can I ask if you ever found a resoultion to this issue? I am working with a Garmin GPS and am having a very similar problem. In my case, the antenna is...
... Ah, ioi fixes it. I thought ioi was optional, a way to save on clocks/bytes? I mean, the preceeding ld (PADR),a work with ioi and without. Oh well, it...