Alarming problem


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Early1's Avatar
    Early1 Guest


    Did you find this post helpful? Yes | No

    Default

    Well changing fro a 16 to 11 character string did the trick, it works.

    Thanks

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Great. I think I may have found out why.

    Try running this with a terminal program. When you change array elements
    11-15 in TelephoneNo1 from ASCII 0's to null characters, it does not output
    what you might expect.
    Code:
    DEFINE LOADER_USED 1
    DEFINE OSC 4
    
    TelephoneNo1 var byte[16]
    X VAR BYTE
    Y VAR BYTE
    
    MAIN:
        FOR X = 0 TO 10
          LOOKUP X,["01234567890"],Y ' 11 digit phone number
          TelephoneNo1[X] = Y
        NEXT X
        FOR X = 11 TO 15 ' Now load unused array elements with something
          TelephoneNo1[X] = "0" ' Change this to = 0 VS "0" to see the effect.
        NEXT X
           
        HSEROUT [34,STR TelephoneNo1\12,34]
        HSEROUT [13,10]
        PAUSE 500
        GOTO MAIN
         
        ' Incorrect
        ' Outputs this when 11-15 are assigned null chars
        ' "01234567890"01234567890"01234567890"01234567890"01234567890
        ' Should be (assuming it continues when reaching the 1st null char #12)
        ' "01234567890"
        ' "01234567890", etc,,
    
        ' Correct
        ' Outputs this when 11-15 are assigned ASCII 0's
        ' "012345678900"
        ' "012345678900"
        ' "012345678900"
        ' "012345678900"
    The null characters seem to be screwing up things. Assuming HSEROUT will
    drop the 1st null character in your string, then send the next valid characters
    afterwards, may be the problem.

    It seems to choke after bumping into the 1st null char, and not send the
    remainder of data as expected in the HSEROUT line.

    Maybe the one that originally worked was with an earlier version of PBP, and
    an error has been introduced in the latest version? Could explain why it
    worked then and doesn't now with the same code.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Early1's Avatar
    Early1 Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Bruce

    I could dig out the old computers with the old version of PBP and give it a try.

    Unfortunately there a many old computers in various stages of being canibalised in my garage so it could be a bit of a mission. There again the old original PBP flopy disks must be some where.

    I will see what I can come up with at the weekend. Being an engineer is a curse some times, one has just got to get to the bottom of an issue no mater what.

    Thanks Again

  4. #4
    Early1's Avatar
    Early1 Guest


    Did you find this post helpful? Yes | No

    Default

    Hi Bruce

    The good news is that the alarm is working, my son has built two more one is in the field and the second is ready to go on to a site in London. The Flash Lab is very neat in its simplicity, which is its strength, I would recomend it to anyone. Have you tried one Bruce? :-)

    I dug out the original PBP disks and programmed the Flash Lab board and the result was the same, I have to use the correct number of digits for the telephone number to work. So my conclusion is that the change has nothing to do with the Flash Lab board being 40 or 20 Mhz and nothing to do with the program.

    The modem is different, on the original alarm I used a siemens M20. I can not test this as I do not have one to hand, they are all out in the field.

    Steve

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Steve,

    Glad to hear you got everything going.

    Have you tried one Bruce?
    I use them every day. I designed the Flash-Lab boards...;o}

    I dug out the original PBP disks and programmed the Flash Lab board and the result was the same, I have to use the correct number of digits for the telephone number to work. So my conclusion is that the change has nothing to do with the Flash Lab board being 40 or 20 Mhz and nothing to do with the program.
    I ran a few tests with older versions, and had the same results. Just doesn't work with null characters like you would expect.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Problem with ASM IRQ using FSR0 on PIC18F252
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th March 2008, 20:48
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 21:04
  4. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

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