Having trouble with SERIN command and MAX6675


Results 1 to 40 of 40

Threaded View

  1. #5
    Join Date
    Dec 2010
    Posts
    48


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Normally black boxes are a contrast problem, but is the LCD cod is the same as on another project...

    Post your whole current code and config setup so we can have a look.
    This is what I have so far:

    Code:
     INCLUDE "modedefs.bas"
    
    define    OSC 4
    
    'Alias pins - MAX6675 temp sensor
    MXSCLK  var     PORTA.5   'Clock
    MXCS     var     PORTA.2    'Chip Select
    MXSO     Var     PORTA.4   'Serial out
    
     'Allocate MAX6875 Variables
    MXTemp   var     word    'raw data from 6675/type K sensor
    TempC   var     word    'converted to degrees C
    
    
    '-----------Read and display temperature from MAX6675-----------
    MXCS = 0  'Chip select low
    shiftin MXSO, MXSCLK, 0, [MXTemp\16]   'read the data to MXTemp
    MXCS = 1    'Chip select high
    TempC = MXtemp >> 5   'right shift the data 5 places to get degrees C (Read the Data sheet)
    LCDOUT $fe,2,"Temp = ", DEC TempC, "degrees C "  ' Spit it out on an LCD
    The contrast on the LCD is alright I have it adjusted properly. What does "Invalid RAM location specified" mean?
    Last edited by emerson; - 10th December 2010 at 05:24.

Members who have read this thread : 1

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