Wavecom with 16F628 communication problem


Closed Thread
Results 1 to 4 of 4

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Eric,
    As Dwayne said, 9600 baud @ 4MHZ is certainely not good.. even worst with the internal one AND by using SERIN. A better practice is to use the internal USART of your PIC and an external Crystal or ceramic resonator.

    PIC16F628 have an internal USART, look for HSERIN/HSEROUT

    Bonne chance et a bientot!
    Steve

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

  2. #2
    Join Date
    Jun 2006
    Posts
    6


    Did you find this post helpful? Yes | No

    Thumbs up Code

    LEGGISMS:

    MESS=0
    HSEROUT ["AT+CMGL=",34,"ALL",34,13]
    hserin 800,EXITLEGGISMS,[SKIP 10, wait(34,",",34),TMP]
    MESS=1
    NUMERO[0]=TMP
    LUNGNUM=1
    while TMP<>34 AND LUNGNUM<20
    hserin 10000,EXITLEGGISMS,[TMP]
    NUMERO[LUNGNUM]=TMP
    LUNGNUM=LUNGNUM+1
    wend

    hserin 10000,EXITLEGGISMS2,[SKIP 5, WAIT(34),TMP,tmp]
    LUNGSMS=0
    while LUNGSMS<60
    hserin 10000,EXITLEGGISMS2,[TMP]
    D[LUNGSMS]=TMP
    LUNGSMS=LUNGSMS+1
    wend


    EXITLEGGISMS2:
    LUNGNUM=LUNGNUM-2

    LUNGSMS=LUNGSMS-1

    FOR TMP=0 TO 60
    IF D[TMP]=";" THEN
    TMP=TMP+1
    FOR TMP1=0 TO 4
    PWD[TMP1]=D[TMP+TMP1]
    NEXT TMP1
    TMP=61
    ENDIF
    NEXT TMP


    FOR TMP=0 TO 10
    toggle led
    pause 200
    NEXT TMP
    low led


    PAUSE 3000
    HSEROUT ["AT+CMGD=0,4",13] 'CANCELLO TUTTI I MESSAGGI
    HSERIN 10000,EXITLEGGISMS,[wait ("OK")]
    PAUSE 1000
    PAUSE 2000


    EXITLEGGISMS:
    RETURN

Similar Threads

  1. Strange problem with Serin/Serout on 16F628
    By Atom058 in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 22nd August 2008, 01:16
  2. Replies: 3
    Last Post: - 12th February 2007, 19:32
  3. Replies: 5
    Last Post: - 20th March 2006, 02:34
  4. Replies: 8
    Last Post: - 11th November 2004, 21:08
  5. 16F628 on-chip eeprom problem
    By atomski in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 4th March 2004, 08:43

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