rfPIC Serin problem - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 53 of 53
  1. #41
    Join Date
    Nov 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default help with pic12f676

    Hi,

    I managed to work through the receiving and process the data and store it to DATA0.
    What I can't do now is sending out serially the 8 bit DATA0 to
    the pin SER_OUT(which happens to be PIN RC0).

    I've tried to copy DATA0 to PORTC (in RECORD2) but since PORTC is only 6 bit, the data is not out correctly. Can anyone help me please?

    ;----------------------------------------
    ; RECORD
    ; Records each bit as it comes in from the data stream.
    ;
    ; Input Variables:
    ; RXDATA
    ; Output Variables: 1 bytes of the 8 bit data read from sensor
    ; DATA0

    RECORD
    movf HIGHWDTH, W
    subwf LOWWDTH, W ; The state of the carry bit after
    ; this operation reflects the data
    ; logic. This is then rotated
    ; into the storage bytes.
    rrf DATA0, F ; the only data to be processed
    movlw HIGHP ; 0x04 to STATECNTR
    movwf STATECNTR
    decfsz BITCNTR, F ; If the bitcntr is = 0 , skip next instruction
    goto MAIN
    ; set to count for 1 data - record 1 byte of data bit by bit
    movlw D'1' ; Starting here and including RECORD1
    movwf COUNTR ; a check is made to make sure that

    movlw DATA0 ; the data is not composed entirely
    movwf FSR ; of 1s.
    ;FSR is the register to store the DATA0
    RECORD1 ; this is the procedure of indirect addressing
    movlw 0xFF
    xorwf INDF, W ; Use indirect referencing to point to
    btfss STATUS, Z ; DATA0 on subsequent loops
    goto RECORD2 ; in RECORD1.

    incf FSR, F
    decfsz COUNTR, F
    goto RECORD1

    goto RESTART

    RECORD2
    movlw WAIT
    movwf STATECNTR ; Make state WAIT4END

    movfw DATA0 ; copy DATA0 to PORTC
    movwf PORTC ; want to send data out serially

    ; bsf SER_OUT ; pin RC5 to observe the processed output

    goto MAIN

  2. #42
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    medusa2584,
    Recheck your code flow.
    You're still trying to RETURN from GOTO in various places.
    And (I'm not even sure if it's possible in MPLAB) are you getting stack OVERFLOW errors or stack UNDERFLOW errors? If getting UNDERFLOW is possible, that's what I'd say you're getting.

  3. #43
    Join Date
    Nov 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    thanks skimask. i solved the the underflow and overflow program. however, i got a new problem.

    when i tested my program with rfpic12f675, and put probe at gp2 and gp5. the output is similar with what i simulated in mplab sim. there is preamble, header, and data bits. however, there is no change of output displayed on the oscilloscope even i dont supply any input to the transmitter. any suggestion why this happened?

    the output always showed data bit of 1111 0111 which is weird since i sont supply any input to the system.

    any suggestion anyone?

  4. #44
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    medusa2584,
    Recheck your code flow.
    You're still trying to RETURN from GOTO in various places.
    And (I'm not even sure if it's possible in MPLAB) are you getting stack OVERFLOW errors or stack UNDERFLOW errors? If getting UNDERFLOW is possible, that's what I'd say you're getting.
    Hello skimask,

    I'd like to take this opportunity to welcome you back to the forum. I do hope that your stay will be a long, pleasant & fruitful one. Everyone deserves a second chance

  5. #45
    Join Date
    Nov 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Hi,

    I was simulating my program and did not even finish running everything - my MPlab just suddenly close itself with a window Microsoft is checking the problem.

    Does anyone know why? Is that because of my Vista or because of the bug in the
    new version MPLab IDe 8?

  6. #46
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Check out the Microchip forum, i remember to have already heard about some strange problem using Vista.
    http://forum.microchip.com/tt.aspx?forumid=57

    PS: you have 'till January to buy an XP o/s... to me, Vista is really not recommended before, at very least, 1 year...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #47
    Join Date
    Nov 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    I suppose that might be the problem. I'll try simulating that on XP based first then.

    I need some help with understanding the rate of data in programming the receiver rfrxd420 using pic16f676.

    The demo program currently indicates that the the TMRHIGH and TMRLOW to be multiply with 4us. Does this relates to the baud rate?
    I'm having problem to understand the timing of the program.
    Can anyone help?

  8. #48
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by T.Jackson View Post
    Hello skimask,
    I'd like to take this opportunity to welcome you back to the forum. I do hope that your stay will be a long, pleasant & fruitful one. Everyone deserves a second chance
    2nd chance?
    2nd chance at what?
    Did I lose my first chance at something?
    Did you have something to do with afford me a second chance at whatever it is?
    Did I go somewhere else that I needed to come back?

  9. #49
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Howdy skimask, good to hear from you again.
    Dave
    Always wear safety glasses while programming.

  10. #50
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    2nd chance?
    2nd chance at what?
    Did I lose my first chance at something?
    Did you have something to do with afford me a second chance at whatever it is?
    Did I go somewhere else that I needed to come back?
    I see that someone is experiencing some considerable "self-denial".

  11. #51
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by T.Jackson View Post
    I see that someone is experiencing some considerable "self-denial".
    Time for someone else to step outside and play a one-handed game of hide and go @$%&# one's self...and deny some of that...

  12. #52
    Join Date
    Nov 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by medusa2584 View Post
    thank you very much for the reply..

    i have one more question..im testing the rfPIC development kit right now with the demo program..we are trying to test the rf12F675 by using oscilloscope by conneting the probe to the pin output which is pin GP5 and GP0. however, we see no signals output from the transmitter except the analog voltage value 1.29 mv which i think comes from the power supply.

    any suggestion how to test it? we have checked the connection circuit many times..but it still give us the same result
    does anyone know why we have to times it by 32? i have looked at the datasheet, but it does not state the reason anywhere.

  13. #53
    Join Date
    Mar 2008
    Posts
    14


    Did you find this post helpful? Yes | No

    Default RFPIC project

    Hi all I am currently working on a project using the rfPIC micro. I am wondering if anyone has done any work with this PIC without using the dev board. I want to build the circuits myself and program them to work. if anyone has done this and can give me some assistance it would be greatly appreciated.

    Thanks

Similar Threads

  1. Serin Problem with 12F629/PBP
    By Flyingms in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th March 2009, 14:59
  2. Serin Problem 16f819
    By jjohannson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 22:50
  3. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25
  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. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44

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