Serin Serout possible wiring distance


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    PC connection, that's one of the problems, I don't have an ftdi interface or want to buy theirs at £25 as it's at my cost.

    I tried direct 9pin max232 connection but I don't get a response except echo back.

    I'm also completely puzzled as to why I can't hear anything except a low dull pulse on my UHF sdr receiver when in test mode. It's supposed to be a higher power version rf module. I should see and hear the pulses at 868.3 mhz.

    Yet I can pick up my signal generator strongly which is 100 times less output!

    Every now and then I get a good visual signal with high strength but it's not consistent.

    I will have to abandon the RSSI output and just go to the base use for the modules. It needs to be boxed and out by early next week.

    Rob

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    OK don't know why I didn't think of it before, I used my scope on the TX RX pins when both units are in test mode.

    They have data back and forth at 1 second intervals. That means they are transmitting and receiving.

    So, it's down to this routine not working. Given the details above I just can't see why :-

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  3000,sigstrength,[WAIT("aSSRSSIS-",sigfield)]    ; get slave signal strength value                                        
        DEBUGIN  3000,sigstrength,[WAIT("aMMRSSIM-",sigcontrol)]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        GOTO sigstrength

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Well, the pulsed transmission is not going to be heard on a UHF receiver as they are very short duration.

    Try this on the debugin:

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  3000,sigstrength,[WAIT("aSSRSSIS-",dec3 sigfield)]    ; get slave signal strength value                                        
        DEBUGIN  3000,sigstrength,[WAIT("aMMRSSIM-",dec3 sigcontrol)]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        GOTO sigstrength
    Ioannis

  4. #4
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hi Ioannis,

    I tried that and for some reason it won't compile, errors with "Expected ] " but it is all correct ??



    Since then I've changed things around to suit the cable distance I need between the rf module and the pic.

    I've separated the rf module and also the 3.3v regulator, so the rf module has it's own supply. I then replaced the 3.3v regulator on the pic board with a 5v version.

    So, pic and lcd at 5v. Rf module at 3.3v. Currently separated by 1m of cable just testing.

    I also rewired and connected the module to the hardware serial port. This means that the serial is better able to cope with the distance and hopefully up to scratch for speed.

    At the moment I seem to have disturbed the basic operation of the system, the switch for changing the led status is causing a reset. I need to investigate. I should have it sorted later and will report back.

    Rob

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Yes there is a syntax error:

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  3000,sigstrength,[WAIT("aSSRSSIS-"),dec3 sigfield]    ; get slave signal strength value                                        
        DEBUGIN  3000,sigstrength,[WAIT("aMMRSSIM-"),dec3 sigcontrol]  ; get control signal strength value 
        
        LCDOUT  $FE,$80," Light Unit ",sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",sigcontrol                                         
        GOTO sigstrength
    And I wonder, wasn't that giving you a compilation error before?

    Ioannis

  6. #6
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Hmm, that was interesting.

    I had cut the board to separate the two modules but in doing so I had isolated one ground track. The LCD ground was on it.
    Turns out it was using the grounded switch, when selected, to power LCD so when selected switch to 1 it had no ground except via some sort of torturous route, hence resets. Now sorted.

    I have gone back to DEBUG using the hardware pins and turned off the UART. It wouldn't receive from the rf module but would transmit. Puzzling ? DEBUGIN works so back to a working system except data for RSSI.

    I still get a compile error for the DEC3 even though I tried both syntax versions.

    Rob

  7. #7
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    try ... DEC3(sigfield)]

  8. #8
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: Serin Serout possible wiring distance

    Yes yes yes, finally !

    This is what was required to make it work.

    Code:
    sigstrength:
    
        IF jump = 1 THEN rssioff     ; check input to reset to serial                                             
        DEBUGIN  1500,sigstrength,[WAIT("aSSRSSIS-"),DEC3 sigfield, DEC3 sigcontrol]    ; get signal strength values                                         
        LCDOUT  $FE,$80," Light Unit ",#sigfield                                       
        LCDOUT  $FE,$C0," Control Unit ",#sigcontrol                                         
        GOTO sigstrength

    Note change(s). Apparently the photo of the display in RSSI is parsed by the software to separate lines. In reality it's a single stream of both items per second. The LCDOUT needed # for ASCII.

    Rob

Similar Threads

  1. Using SEROUT and SERIN
    By acinorth in forum Test Area
    Replies: 1
    Last Post: - 20th July 2011, 11:33
  2. Serout -->>> serin
    By larzazral in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th February 2010, 03:46
  3. SERIN and SEROUT
    By CumQuaT in forum mel PIC BASIC
    Replies: 10
    Last Post: - 3rd September 2009, 00:17
  4. serin,serout
    By andrewwaack in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th July 2006, 19:21
  5. serin/serout
    By simonr in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th September 2003, 18:45

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