hserin


Closed Thread
Results 1 to 29 of 29

Thread: hserin

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default :)

    Quote Originally Posted by jcleaver View Post
    no pain no gain

    the problem is i am unable to get a serial lcd driver to function

    tried many many different things still nothing
    thought different commands would inprove nothing seems to work

    even though i am getting something (scope) out of the pic

    tried all the serial commands and different bauds ebven thought the device states 9600 8 n 1
    device did work using basic stamp instructions
    It's not a basic stamp, while a stamp is a pic. HUH? WHATS THAT?
    PBP will program a stamp, but pics not always the same, little differences.
    Hserin will not accept N9600, has to be true.
    Serin wil accept N9600. Hserin will accept charactors incomming while pic is busy running subroutines, serin will not. Do a search for serial backpacks on this forum, this subject has been addressed. look at the code in my post on this subject after Darrel did his magic on it. It's sweet, uses hserin, DT instant interrupts and formats the same way as LCDOUT does. It is pretty well commented so you can learn how it works and change it to suit you.

    if you just want a serial in parallel out
    try
    Code:
    include "modedefs.bas"
    pause 500
    char var byte
    Lcdout $fe, 1, "RTFM"
    pause 1000
    LOOP:
    serin Portb.0, n9600, char
    LCDOUT char
    goto loop
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default

    HSERIN & HSEROUT automatically use the PIC's hardware USART pins. Which pins these are can be found in your datasheet.

    Most serial LCD's require inverted data format. The hardware USART uses non-inverted, since data will normally pass through a MAX232 level converter.

    If you use the hardware USART to communicate with your serial LCD, and your LCD requires inverted data, then, with HSEROUT, you'll need a TTL level converter, or use one of the other serial commands like SEROUT, SEROUT2, or DEBUG.

    These commands allow you to control whether the data is inverted or non-inverted, and use just about any I/O-pin. HSEROUT does not.
    Regards,

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

  3. #3


    Did you find this post helpful? Yes | No

    Question frustrated

    still not getting a display using any of the pbp
    serial out commands tried all 4 copied some programs still nothing even though the pic seems tp be transmitting something
    hook up is straight foward 5- volt ,grd, and one pic pin for data out
    tried many pins
    using a 16f877a and very simple programs one attached

    somemade mention of trisb txsta and spbrg

    are these set automatically using the pbp commands if not i have no idea how to set them melanie gave some instruction on setting fuses but not sure
    what i need to set

    can someone help/
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    Which boot-loader & serial LCD are you using?
    Regards,

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

  5. #5


    Did you find this post helpful? Yes | No

    Red face reply

    using microstudio for boot loader but have tried no loader with the same results using a serial lcd from redbinary lcd is 2 * 16 it does display its strartup message so assume electrical is ok they onmly deal with c programing not much i know about that (nothing)

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jcleaver View Post
    using microstudio for boot loader but have tried no loader with the same results using a serial lcd from redbinary lcd is 2 * 16 it does display its strartup message so assume electrical is ok they onmly deal with c programing not much i know about that (nothing)
    Here's your code with a couple of tweaks, have not tested it though:
    Code:
    '****************************************************************
    '*  Name    : UNTITLED.BAS                                      *
    '*  Author  : JACK CLEAVER                                      *
    '*  Notice  : Copyright (c) 2007 [select VIEW...EDITOR OPTIONS] *
    
    '*          : All Rights Reserved                               *
    '*  Date    : 2/17/2007                                         *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '****************************************************************
    @MyConfig = _HS_OSC & _WDT_OFF & _PWRTE_ON & _LVP_ON 
    @MyConfig = MyConfig & _BODEN_OFF 
    @ __config  MyConfig    ; sets your programmer's "fuses"
    TRISB = %11111110 ' ALL B AS INPUTS EXCEPT B.0
    TRISA = %11111111 ' ALL a as inputs
    INCLUDE "Modedefs.bas"  ' This is a must have for serial communications using serout
    CMCON  = 7  ' turn off comparators
    ADCON1 = 7  ' turn off a/d converter
    DEFINE PIC16F877A
    DEFINE OSC 20
    DEFINE      LOADER_USED 1   ' Boot-Loader is being used
    DEFINE      OSC 20          ' We're using a 20MHz oscillator
    DEFINE CHAR_PACING 1000
    x var byte 
      w1 var byte
    w1 =0
    
    
    Setup:
    w1 = 1
    pause 1400
    Main:
    for x = 1 to 6
      SEROUT portb.0,6, ["ABCD", #w1] 'mode 6 = N9600 mode 2 = T9600
      w1 = w1 + 1
      PAUSE 250
      next x
      GOTO Main
      END
    Last edited by Archangel; - 20th February 2007 at 02:41.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  7. #7


    Did you find this post helpful? Yes | No

    Red face thanks

    thanks for the reply will try this have moved display over to a 628a and get
    fairly good some garbage dont know what that is

    also trying to send a escape sequence to set up the serial chip

    but that does not work any ideas on this tried
    dec 27 or hex 27 or "<esc>" not working
    interesting will not display esc here with the <>

    also why the garbarge do want to move this back to 677a so will be trying your setting
    again thanks for the feedback
    Last edited by jcleaver; - 20th February 2007 at 12:13.

Similar Threads

  1. HSERIN and XOUT command
    By aratti in forum General
    Replies: 20
    Last Post: - 12th May 2009, 11:58
  2. Instant Interrupts and HSERIN
    By Rob in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 31st January 2009, 05:13
  3. TMR0 interrupt and HSERIN
    By boban in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd September 2008, 11:48
  4. 16F877a Interupt driven Hserin
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd November 2006, 00:38
  5. Hserin
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th November 2004, 15:42

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