nedd help 16f84


Closed Thread
Results 1 to 6 of 6

Thread: nedd help 16f84

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    M E Labs ( the maker of your compiler ) has samples, and I think that is where this one came from as it has zero documentation ( as to ownership ). I suggest you look their site over, many samples there.
    Code:
    ' READ and WRITE word variables to on-board EEPROM
    '
    ' Word is used to add 1000 to each location address and store the
    ' result.  The word data must be stored as 2 separate bytes.
    
    
            INCLUDE "modedefs.bas"          ' Include serial modes
    
    SO      VAR		PORTC.6					' Define serial output pin
    
    B1      VAR     BYTE					' Address variable
    W2      VAR     WORD					' Data variable
    
    
    loop:   
    
    		For B1 = 0 To 12 step 2			' Step 2 because each word requires 2 bytes of memory
            	W2 = B1 + 1000          	' Add 1000 to address
            	Write B1, W2.HIGHBYTE		' Write high byte of word
            	Write B1+1, W2.LOWBYTE		' Write low byte of word to next address
    		Next B1
    
    		For B1 = 0 To 12 step 2			' Step 2 to get word size data
            	Read B1, W2.HIGHBYTE		' Read high byte
            	Read B1+1, W2.LOWBYTE		' Read low byte
            	SerOut SO,T2400,[#W2," ",10,13]	' Display the word data
    		Next B1
    		
            SerOut SO,T2400,[10,13,10,13] 	' Skip 2 Lines
    
            GoTo loop                       ' Forever
    you see a for next loop pointing to location in eprom to write or read from.
    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
    Apr 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    thank you joe for helping im doing these examples, and i used buttoms to rite and read in the eeprom till now i will try to learn more well thank you again for helping,

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malwww View Post
    thank you joe for helping im doing these examples, and i used buttoms to rite and read in the eeprom till now i will try to learn more well thank you again for helping,
    Come back after you have tried those with more questions, the more you learn, the better your questions will get, and better teachers will step up.
    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.

Similar Threads

  1. 16F84 and I2C bus
    By Navaidstech in forum General
    Replies: 2
    Last Post: - 20th March 2009, 16:04
  2. send data from VB 6 to PIC 16f84
    By win_832001 in forum Serial
    Replies: 2
    Last Post: - 9th March 2006, 14:21
  3. how to send data from VB to PIC 16f84
    By win_832001 in forum Serial
    Replies: 0
    Last Post: - 25th February 2006, 16:15
  4. End of the 16F84
    By Squibcakes in forum General
    Replies: 2
    Last Post: - 20th May 2004, 14:40
  5. Replies: 3
    Last Post: - 3rd September 2003, 12:05

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