Of course, since the macro only uses the low byte of R4 to index the array. That would also make it fail when using a constant >255.
In any case, the "example" posted in the first place had a BYTE...
Type: Posts; User: HenrikOlsson; Keyword(s):
Of course, since the macro only uses the low byte of R4 to index the array. That would also make it fail when using a constant >255.
In any case, the "example" posted in the first place had a BYTE...
Which device are you using?
I compiled two different version and looked at the .lst and with my limited understanding of assembly I'd say it "should work"
First, HSEROUT [STR Buffer\16]
...
I don't know and I can't test/try if your code right now but a simple workaround would be
For i = 0 to BalCount ' (Or possibly BalCount-1)
HSEROUT [BalBuffer]
NEXT
HSEROUT [26,13]
Further, variables aren't automatically initialized (ie set to a specific value).
Where in your code you put the declaration of the variable can change the ORDER of the variables in RAM so if,...
I don't know but the way I understand and interpret it is that between user variables that HAVE specific bank requests and those that don't the first ones ARE handled first - but still AFTER the PBP...
Remember that PBP itself uses a bunch of variables and it most likely needs to use BANK0 for them for the same reason that you want to use BANK0. The number of variables PBP uses depends on what...
I was a little quick with that PCON thing, on startup set PCON = %00011111 then let the program run
serout2 PORTC.6, 16468, ["Power-on:", BIN8 STATUS, " - ", BIN8 PCON, 10,13]
PCON =...
Since the I'm alive output is outside of and before Main it looks to me as if the PIC is resetting and starting over. Try something like:
serout2 PORTC.6, 16468, [BIN8 STATUS, " - ", BIN8 PCON,...
Hmm, section 1.4 in the datasheet I happen to look at seems to show, in quite some details, how data is exchanged and they let you know that more details can be found in the SH-2 Reference Manual.
...
The datasheet for the 16F19176 seems to indicate that the device has actual EEPROM on board and does not mention HEF (High Endurance Flash) so I would expect DATA/READ/WRITE to work with that device....
Disclaimer: Have never actually used HEF so this is not based on experience but rather on how I believe/think it works.
Since HEF is part of FLASH I'd say the command(s) to use is...
The gold and silver editions allows you to install and activate PBP on up to 3 machines, do you have that many and still need that extra laptop?
The pin you're trying to use is configured for analog input.
Have you TRIED it? Sometimes simply trying a few things out on your own gives you the answer much faster than asking here.
IF (A=1 AND B<6) OR (A=2) THEN
LED = 1
ENDIF
Whenever A = 2 LED...
AND, OR, XOR, ANDNOT, ORNOT, XORNOT all have the same precedence and so are evaluated from left to right. But, as the manual says:
IF (A=1 AND B<6) OR (A=2) THEN makes it much clearer.
Yeah, until you here from Charles I'd be very careful with pushing the library routines beyond the 64k barrier.
I did compile the code and I did look at the .lst but I didn't see/understood the...
Regarding negative numbers, as long as both variables are of the same size what you did will work:
Cnt VAR BYTE
Add VAR BYTE
Cnt = 100
Add = -1
Cnt = Cnt + Add ' Cnt now = 99
In a perfect world (or a simulator) writing to PORT will have the same effect as writing to LAT. In the real world that's not always the case - depending on various circuimstances.
On any PIC that...
Something like this perhaps?
Cnt VAR BYTE
Dir VAR BIT
UP CON 1
DOWN CON 0
SomeLoop:
First, there's the actual shiftregister into which the data is shifted bit-by-bit as it's received. You don't have access to this register (AFAIK).
Once the correct number of bits have been shifted...
That's weird. I'm working on a large project right now, have LONGs enabled and, except for one thing*, have not noticed any such problems. Have been using DEC, BIN, HEX extensively.
You show a...
It can. What you're looking to do is basically implementing a USB keyboard using USB HID. When connected it will, to the PC, look like any old USB keyboard. I've managed to do it using examples on...
We had a similar discussion not that long ago, might be worth revisiting.
It's important to remember that one usually want to do more than JUST keep track of an enocder and that has to be accounted...
I have a hard time believing that was the actual problem. In PBP (unlike, for example, C) = and == are the same thing. And you basically have the proof in your own code sine the WHILE loop works and...
With a 10bit ADC (like most PICs have) and a VRef of 5V you get a (theoretical) resolution of 4.88mV. Your typical sin/cos type encoder outputs 1Vpp which means that (again, in theory) you should be...