As is clear from above, I have never used verilog ...., for completeness this not so pretty approach still works
Code:;Datum[6:4] = 2 Datum.6=0 Datum.5=1 Datum.4=0OR you could blast the first type with inline ASMCode:;IF PORTB[5:1] = 3 THEN If (PORTB & $3E) = $06 THEN
Others might have a cleaner method?Code:;Datum[6:4] = 2 Datum var byte ASM movlw 0x20 ; b00100000 new values xorwf _Datum, W andlw 0x70 ; b01110000 mask values xorwf _Datum, F ; bX010XXXX ENDASM
EDIT - added comments to ASM routine




Bookmarks