Any chance of Life being easy?


Results 1 to 5 of 5

Threaded View

  1. #4
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    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=0
    Code:
    ;IF PORTB[5:1] = 3 THEN
    If (PORTB & $3E) = $06 THEN
    OR you could blast the first type with inline ASM

    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
    Others might have a cleaner method?

    EDIT - added comments to ASM routine
    Last edited by paul borgmeier; - 2nd November 2006 at 21:41.
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

Similar Threads

  1. Easy and Accurate Clocks without RTC IC
    By paul borgmeier in forum Code Examples
    Replies: 18
    Last Post: - 28th October 2013, 22:28
  2. Transceiver ER900TRS Easy Radio
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th August 2008, 12:25
  3. Super easy 18F print strings to UART
    By Bruce in forum Code Examples
    Replies: 0
    Last Post: - 27th August 2007, 00:19
  4. EEPROM life expectancy?
    By muddy0409 in forum General
    Replies: 3
    Last Post: - 1st May 2007, 13:44
  5. Easy LCD BackLight
    By Melanie in forum Schematics
    Replies: 0
    Last Post: - 17th October 2004, 14:18

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts