12f675_fuse_about_to_blow!


Results 1 to 40 of 929

Threaded View

  1. #26
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Kind of like science fiction.
    Exactly,even stranger though!

    Here's tonight's effort, it works up to DEC255 then ouputs a zero for 256 etc, which is larger than a BYTE I'm thinking.

    Code:
    ANSEL   = %00000000    'Disable analog select so ports work as digital i/o.
    CMCON0  = %00000111    'Disable analog comparators.
    TRISA   = %00000000    'Set PORTA as OUTPUT.
    PORTA   = %00000000    'Set PORTA pins all low.
    TRISC   = %00000000    'Set PORTC as OUTPUT.
    PORTC   = %00000000    'Set PORTC pins all low.
    
    DEFINE OSC 4
    
    MYVAR  VAR BYTE 
     
    MAIN:
    PAUSE 250
    SERIN2 PORTC.5, 16780, [DEC MYVAR] 'MODE 16780 = 2400 BAUD INVERTED 
    IF MYVAR = MYVAR THEN HIGH PORTA.5 'LET'S YOU INPUT ANY NUMBER.
    PAUSE 5000
    low PORTA.5
    pause 250
    SEROUT2 PORTC.3, 16780, [HEX MYVAR, 10, 13] 'OUTPUT IN HEX 'MYVAR' 10=L_FEED 13=C_RETURN
    pause 5000
    GOTO MAIN
    Last edited by LEDave; - 13th April 2010 at 20:02.

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