serin Bug on PIC16f688?


Results 1 to 13 of 13

Threaded View

  1. #4
    Join Date
    May 2006
    Posts
    19


    Did you find this post helpful? Yes | No

    Post

    I connected my data wire with a 10k resistor to the ground (thats pulling down right?) and tried to use any combination of boudrates but i never see my pic blinking (so no data transmission yet...)
    @stamp:
    Code:
     
    DO
    FOR dat = 16000 TO 20000 STEP 1
    DEBUG DEC5 dat,CR
    SEROUT 10,dat, ["kk"]
    NEXT
    @pic
    Code:
    serIn2 S_in ,16780,[wait("k"),dat]
    gosub blink
    my pic and stamp both use the same power source so that can't be the problem either. and my stamp CAN transmit to my stamp so timing must be right...

    can anyone provide me a working code to make two pic16f688 communicate trough portc.1 so i can test my pics with that code.

    here is my full code again:
    stamp:
    Code:
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' {$PORT COM1}
    
    dat VAR Word
    
    DO
    FOR dat = 16000 TO 20000 STEP 1
    DEBUG DEC5 dat,CR
    SEROUT 10,dat, ["kk"]
    NEXT
    
    LOOP
    pic:
    Code:
    define OSC 20
    
    
    S_in    var PORTC.1
    S_Out   var PORTC.1
    Led     var PORTC.3
    dat     var byte
    
    init:
        gosub Startblink
        high led
        low led
        pause 500
        gosub blink
        
    Main:
           
    	SerIn2 S_in ,16780,[wait("k"),dat]
    	gosub blink
        pause 50
    goto main
    
    
    Blink:
        high led
        pause 10
        low led
    return
    
    Startblink:
        for dat = 1 to 16
        high led
        pause 10 * (16-dat)
        low  led
        pause 10 * (16-dat)
        next 
    return
    please help me...
    Attached Files Attached Files

Similar Threads

  1. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  2. serin question?
    By sachymo in forum General
    Replies: 5
    Last Post: - 27th July 2008, 10:04
  3. BUG IN PBP 2.50 & 2.50A pic16F688 ??
    By FRANCISCOGIM in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 12th June 2008, 02:42
  4. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

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