View Single Post
Old 10th May 2023, 2:59 am   #119
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,440
Default Re: Anyone building a PICL? more PCBs available

Quote:
Originally Posted by Phil__G View Post
if you wanted to test solely for A+B together in a NIBL prog, then
10 IF STAT AND 48=0 THEN PRINT "BOTH PRESSED"
Is that what you're looking for Owen? bear in mind the progs in the PICL doc are just simple examples to demo what NIBL can do...

Re the changes, I'm awaiting Mikes return, I think thats only fair, he will probably want to rework the changes
Briefly it was the way the CSA instruction was coded, plus making the SIO instruction output to SOUT (for David)

I forgot to try it before but my 18877 PICL here on my lap reports set flags correctly... if I say STAT=1 then PRINT STAT, then it shows bit 0 set, same for STAT=2,4,8 and any combination...
Thanks, Phil, for that.
Yes, doing one case is quite easy to do. It's when you want to handle all the cases/combinations, with a single-line message, that things get a bit more involved - especially in a fairly 'basic' programming language, and might need to resort to the often dislike 'GOTO' jump.

Yes, happy to wait for Mike's return to see finalised version. I hadn't realised you'd also done the SIO changes to the 16F18877 version, as well as doing that on a (now 9600bps serial) 16F877 PIC version.

IIRC, the Flag-Output LED's were all off on both PIC16F877 & PIC16F18877 versions I tried, when I found there was a difference of '15' between read 'STAT' values. But maybe there is something in the emulation that doesn't quite get initialised the same between the different PIC versions until a write to STAT is done. I'll try and have a bit more of a play with the 2 versions in the next day or so.
ortek_service is offline