18F4550 issue with simple program.


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: 18F4550 issue with simple program.


    adval var word ' Create adval to store result
    adval1 var word
    adval2 var word ' Create adval to store result
    adval3 var word
    adval4 var word ' Create adval to store result
    adval5 var word
    .............................

    pause 1
    write 0, adval

    adcin 1, adval1
    pause 1
    write 1, adval1

    how many bytes in a word ?

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: 18F4550 issue with simple program.

    Jmgelba, you need to index the memory pointer by 2 for it to store a word or, something like this:

    write 1, adval1.lowbyte
    write 2, adval1.highbyte

    then you can read them back by using:
    READ 1,value to read the entire word.
    Dave Purola,
    N8NTA
    EN82fn

Similar Threads

  1. USB issue - 18F4550
    By Scampy in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 20th February 2013, 21:49
  2. 18F4550 issue
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 4th February 2013, 07:27
  3. Simple LED driving issue - setup?
    By George in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th March 2011, 02:54
  4. Code issue with a flashing light(simple question)
    By IAmTheAnswer in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th May 2010, 12:46
  5. Simple 4 line LCD display with 18F4550
    By pic-ker in forum Code Examples
    Replies: 4
    Last Post: - 9th April 2007, 03:58

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