I'm no assembler pro but, shouldn't this line :MOVF b'00001111',W ;MOVING 15('F') TO W REGISTER be something like this: MOVLW b'00001111',W ;MOVING 15('F') TO W REGISTER?
I'm no assembler pro but, shouldn't this line :MOVF b'00001111',W ;MOVING 15('F') TO W REGISTER be something like this: MOVLW b'00001111',W ;MOVING 15('F') TO W REGISTER?
Dave Purola,
N8NTA
EN82fn
I thought it was a forum for PicBASIC pro![]()
![]()
Yes, execution will be looking at address 15 for a file value which is probably zero instead of moving the literal 15 to w.
Probably a typo because setting w with a literal is done properly elsewhere.
Code still makes no sense. Both copies to portC will always execute. Both values are 1 for now, but won’t be in application.
You need to skip a goto, not skip a line. Otherwise you just sent the last value in w which was 15.
If the code does what you want you only see a mash of the two values you want on the LEDs anyway.
Both overall display values 14 & 15 would be written alternately very fast.
This forum has always supported assembly where it relates to PBP, and so it should, but from start to finish belongs on Microchip’s forum.
If you link to a new post there, it looks easy to sort out, but I don’t think it should happen here.
Last edited by Art; - 9th April 2018 at 18:11.
Maybe that’s a more appropriate answerCode:w = portd portb = w & b00001111 w = w >> 4 portc = w
PBP can’t do anything that can’t be done in assembler.
No need to ever check anything unless there are possible values you want to discount.
Bookmarks