ATMEL's 89S8252 first program

This is a discussion on ATMEL's 89S8252 first program within the C Programming forums, part of the General Programming Boards category; Hello, I am trying to send some volts to my databus and i meter them. The program is following. #include ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    30

    ATMEL's 89S8252 first program

    Hello,
    I am trying to send some volts to my databus and i meter them.
    The program is following.

    #include <reg51.h>
    #define XBYTE ((unsigned char volatile xdata*) 0)


    void main(void) {

    while(1) {
    XBYTE[0x8001] = 0xFF; // Arxikopoihsh toy 8255 se mode 0
    }
    }

    I put the while for the data to remain as it loops forever.

    So with this command i am sending to the 8001(A15,A0,A1=1) address the FF comand(DB0->DB7 = 1111 1111)

    So these are the volts i want to have in my outs.

    But i meter values like 0,62 volt, 2.10 volt, 4.10 volt and of;course not in the order i want them.

    Could someone tell me if is something obvious why it is not working??

    I am new so excuse me if i make a serious mistake

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,701
    This site may help. There are example programs and datasheets.

    This site has additional data sheets on the Atmel 89S8252.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21