Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Time for me to seduce you, there is no resisting me.

  • 14-03-2006 4:52pm
    #1
    Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    $MOD52
    BYTEVAL EQU p2

    LCDBus EQU P2 ; define processor - LCD bus connections
    RS EQU P3.5 ; define LCD control signal connections
    RW EQU P3.6
    EN EQU P3.7


    KPADPORT EQU P0 ; col/row port & pin assignment
    COL0 EQU P0.0
    COL1 EQU P0.1
    COL2 EQU P0.2
    COL3 EQU P0.3
    ROW0 EQU P0.4
    ROW1 EQU P0.5
    ROW2 EQU P0.6
    ROW3 EQU P0.7


    ORG 000H
    LJMP MAIN

    ORG 300H
    MAIN:
    LCALL INIT_LCD
    LCALL CLR_LCD
    MOV SP, #2FH
    SETB C
    CLR_LED

    MAINPROGLOOP:
    SETB C
    NOP
    LCALL keypadPoll
    NOP
    SJMP MAINPROGLOOP

    ORG 1200H
    CLR_LCD: DB 01h,0FFh ; clear LCD display, place cursor on left of display
    INiT_LCD: DB 38h,0Eh,06h,0FFh ; set bus width (8 bits), display type (2 line, 5x7 d

    keypadPoll:
    mov r0,#4
    mov a, #0F7h
    push acc


    TRYNXTCOL:
    mov kpadport, a
    setb c
    rrc a
    push acc


    CHKROW3: mov a, R0
    ADD A, #12H
    call waitKeyRelease

    sjmp LOOKUPKEYTABLE

    CHKROW2: mov a, R0
    ADD A, #8H
    call waitKeyRelease

    sjmp LOOKUPKEYTABLE

    CHKROW1: mov a, R0
    ADD A, #4H
    call waitKeyRelease

    sjmp LOOKUPKEYTABLE

    CHKROW0: mov a, R0



    sjmp LOOKUPKEYTABLE

    searchNxtCol:

    sjmp keypadPoll

    LOOKUPKEYTABLE:
    mov dptr, #convertTable
    movc a,@a+dptr



    lcall WRITE_DATA_TO_LCD

    WRITE_DATA_TO_LCD:

    CLR A
    MOVC A, @A+DPTR

    ContinueLCD:
    MOV LCDBus, A
    LCALL txfr2LCDAndChkLCDBusyFlg
    INC DPTR;
    MOV A,#00h
    MOVC A,@A+DPTR
    CJNE A, #0FFh, ContinueLCD
    ret

    txfr2LCDAndChkLCDBusyFlg:
    call clrEN
    call setEN
    call setRW ; LCD read mode since reading LCD port for BUSY flag
    MOV LCDBus, #0FFh ; set all LCD port pins as inputs

    chkLCDBusy: ; then wait until LCD busy flag is deasserted :
    MOV A, LCDBus ; read LCDBus data from LCD
    JB Acc.7, chkLCDBusy ; test busy flag bit and wait until clear (if set, loop since LCD is busy)
    NOP
    NOP
    NOP

    call clrRW ;

    RET



    waitKeyRelease: ; polls port row inputs until all keys are released (all row bits='0')
    mov kpadport, #0F0h ; assert all column o/p bits ('0') and define row bits as inputs
    mov a, kpadport ; read keypad port for row data

    jnb ROW0,waitKeyRelease ; keep checking until row bit 0 = '1'. Otherwise continue
    jnb ROW1,waitKeyRelease ; keep checking until row bit 0 = '1'. Otherwise continue
    jnb ROW2,waitKeyRelease ; keep checking until row bit 0 = '1'. Otherwise continue
    jnb ROW3,waitKeyRelease ; keep checking until row bit 0 = '1'. Otherwise continue

    lcall CLR_LCD
    ret


    convertTable:db'0123F456E789DA0BC'

    ret

    end


«1

Comments

  • Registered Users, Registered Users 2 Posts: 6,126 ✭✭✭homah_7ft


    Reply.


  • Registered Users, Registered Users 2 Posts: 6,800 ✭✭✭county


    god,no one is safe:eek: :eek: :eek:


  • Registered Users, Registered Users 2 Posts: 6,126 ✭✭✭homah_7ft


    Triplets


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    My seed is strong.



    txfr2LCDAndChkLCDBusyFlg:
    call clrEN
    call setEN
    call setRW ; LCD read mode since reading LCD port for BUSY flag
    MOV LCDBus, #0FFh ; set all LCD port pins as inputs

    ^^^see.


  • Closed Accounts Posts: 31,967 ✭✭✭✭Sarky


    /me resists Tar's seductive techniques

    Ha! Tekkit!


  • Advertisement
  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    error error error

    *explode*


  • Posts: 0 [Deleted User]


    what that supposed 2 b???


  • Registered Users, Registered Users 2 Posts: 22,231 ✭✭✭✭Sparky




  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,563 Mod ✭✭✭✭Capt'n Midnight


    Oui, s'il est base a base de controlleur Hitachi HD47780!
    Sinon c'est impilotable.

    Les LCD du marches c'est le cas, mais si tu as recuperer un LCD c'est peut etre un truc proprietaire...


  • Registered Users, Registered Users 2 Posts: 8,561 ✭✭✭Rhyme


    Divide by 0...


  • Advertisement
  • Closed Accounts Posts: 122 ✭✭tubey


    error error error

    *explode*

    You post some shite do you know that. Get a life for yourself.


  • Closed Accounts Posts: 31,967 ✭✭✭✭Sarky


    Clearly you are gay. Or possibly even teh ghey.


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    tubey wrote:
    You post some shite do you know that. Get a life for yourself.
    Which of my scorned cheribs are you?
    <3!


  • Registered Users, Registered Users 2 Posts: 3,958 ✭✭✭Chad ghostal


    PFFft assembleY!
    back in my day* we etched binary onto bricks and threw them at the monitor





    *zombie thread portal*
    **almost made up


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    I will win you over with the power of the ARM.
    /extends ARM.


  • Closed Accounts Posts: 9,878 ✭✭✭Rozabeez


    /me swoons...


    OHH....beautiful, beautiful ARM.


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    My thank yous. I work hard, I play hard.


  • Closed Accounts Posts: 688 ✭✭✭skye


    Play harder damn it!!


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    *PLAYS HARDER*


    sjmp LOOKUPKEYTABLE

    CHKROW0: mov a, R0


  • Closed Accounts Posts: 1,838 ✭✭✭Doomspell


    wtf!


  • Advertisement
  • Closed Accounts Posts: 31,967 ✭✭✭✭Sarky


    10 For I=1 to 10
    20 Print"Tar, I love you" I "much!!!!<3"
    30 Next I


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    (i=0;i<infinity;i++)
    {

    printf("will you marry me? I want your babies."\n);

    }

    I call this the heart algorithm. :o


  • Closed Accounts Posts: 31,967 ✭✭✭✭Sarky


    While Pant$="On"
    Print "NEVAR!"
    Wend


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    *removes sarkys pants*


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,563 Mod ✭✭✭✭Capt'n Midnight


    On error goto Panting
    Pants=Pants-1

    Superman=Pants/Trousers


  • Closed Accounts Posts: 31,967 ✭✭✭✭Sarky


    *removes sarkys pants*


    INPUT/OUTPUT OVERFLOW ERROR


  • Registered Users, Registered Users 2 Posts: 30,123 ✭✭✭✭Star Lord


    if pant$="OFF" {
    while overflow$=\="FALSE"
    printf ("Insert disc"\n);
    printf ("Remove disc"\n);
    wend;
    };
    printf ("Thanks love! Do you have a light?"\n);
    endif;


  • Registered Users, Registered Users 2 Posts: 9,706 ✭✭✭Matt Holck


    multiple key register spy ware slows my proformance
    you boys need to get together and share


  • Closed Accounts Posts: 1,838 ✭✭✭Doomspell


    Okay tar...give me your best shot!


  • Advertisement
  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    Well, you would have toi get the bus or train to galway or the beers tomorrow to see my best shot. But here is something toi look forward to:

    sjmp LOOKUPKEYTABLE

    searchNxtCol:

    sjmp keypadPoll

    LOOKUPKEYTABLE:
    mov dptr, #convertTable
    movc a,@a+dptr



    lcall WRITE_DATA_TO_LCD

    WRITE_DATA_TO_LCD:

    LCD_OUTPUT: I LOVE YOU DOOMSPELL. BE MY GIRL <3


  • Registered Users, Registered Users 2 Posts: 8,561 ✭✭✭Rhyme


    MOV CX 69
    ADD BA, BE
    BREAK;
    DOWN;

    /me dances vigorously


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    command: /MODE FUNK


  • Closed Accounts Posts: 9,846 ✭✭✭Le Rack


    no one told me we were dancing!


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    ERROR ERROR

    COMMAND LINE 3: THIS THREAD IS FOR CODE AND BIG LETTERS, **** OFF.


    i++


  • Closed Accounts Posts: 9,846 ✭✭✭Le Rack


    ye wha???


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 8,561 ✭✭✭Rhyme


    C:\Program Files\REDUN\Codeclean.exe
    .BAK initialised
    ...
    ..
    .
    Redundant code orphaned
    removing...
    removed, efficency maintained


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    001 001 010 111


  • Closed Accounts Posts: 31,967 ✭✭✭✭Sarky


    10 Print "*thrust*"
    Goto 10


  • Posts: 0 CMod ✭✭✭✭ Leah Attractive Sushi


    public main{

    System.out.println("take me now, tarry:D ");
    }

    :p


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    while(erect) { thrust(); }


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,589 ✭✭✭Hail 2 Da Chimp


    You aint gonna impress anyone programming in assembler, try programming a friken ARM in C!!!!! TRY IT!!!! ITS UMPOSSIBLE!!!


  • Registered Users, Registered Users 2 Posts: 7,589 ✭✭✭Hail 2 Da Chimp


    #include <91R40008.h>
    //#include <LCD_Atmel.c>
    //#include<lcd_atmel.h>
    int main (void)
    {
    int input, output;
    PIO_PER = 0xffffffff; // Enables pins
    PIO_OER = 0xffffedf9; // Sets pins as outputs
    PIO_SODR = 0xffffffff;

    while(1)
    {input = PIO_PDSR;
    input = input & 0x00001206; //Enables pushbutton pins as inputs

    switch (input)
    {
    case 0x00000206: // Case 1 = Pushbutton 1 pressed
    output = 0xfffeffff;
    PIO_SODR = output; //Set output LED
    PIO_CODR =~ output; //Clear all compliment pins
    break;
    case 0x00001006:
    output = 0xfffdffff;
    PIO_SODR = output;
    PIO_CODR =~ output;
    break;
    case 0x00001204:
    output = 0xfffbffff;
    PIO_SODR = output;
    PIO_CODR =~ output;
    break;
    case 0x00001202:
    output = 0xfff7ffff;
    PIO_SODR = output;
    PIO_CODR =~ output;
    break;
    default:
    PIO_SODR = 0xffffffff;
    }

    }
    return 0;
    }

    Impressed yet? HUH?

    Ya... i thought so... :cool:


  • Registered Users, Registered Users 2 Posts: 9,706 ✭✭✭Matt Holck


    needs comments

    It's not my job to translate your work


  • Registered Users, Registered Users 2 Posts: 7,589 ✭✭✭Hail 2 Da Chimp


    Comments are for people who dont understand...

    You've got to think like a computer!!!!

    (Also i forgot how it works)


  • Registered Users, Registered Users 2 Posts: 9,706 ✭✭✭Matt Holck


    wow
    declare unexplained variables in hex a dicky
    start continoues loop
    record and input from unspecified port
    use switch to catch desired input to break loop


    ever heard of associative vectors?


  • Registered Users, Registered Users 2 Posts: 7,589 ✭✭✭Hail 2 Da Chimp


    There's a few comments for ya,

    What is this associated vector you speak of?


  • Registered Users, Registered Users 2 Posts: 592 ✭✭✭Deer


    This thread is sooooo sexy - I'm getting soooooooooo hot just reading it. You sexy masterful men. I am seduced.:p


  • Registered Users, Registered Users 2 Posts: 7,589 ✭✭✭Hail 2 Da Chimp


    Or as they say in Laymans terms... "as wet as an otters pocket!"


  • Registered Users, Registered Users 2 Posts: 9,706 ✭✭✭Matt Holck


    vector that assocaite a particular index to particular value

    #include <91R40008.h>
    int main (void)
    {
    int input, output;
    PIO_PER = 0xffffffff; // Enables pins
    PIO_OER = 0xffffedf9; // Sets pins as outputs
    PIO_SODR = 0xffffffff;

    var asociateVector["0x00000206"]=0xfffeffff; // Case 1 = Pushbutton 1 pressed
    asociateVector["0x00001006"]=0xfffdffff;
    asociateVector["0x00001204"]=0xfffbffff;
    asociateVector["0x00001202"]=0xfff7ffff;

    while(1){
    input = PIO_PDSR;
    input = input & 0x00001206; //Enables pushbutton pins as inputs
    if (asociateVector[input]){ // if value for asociateVector exists
    output = asociateVector[input];
    PIO_SODR = output;
    PIO_CODR =~ output;
    break;}
    else PIO_SODR = 0xffffffff;

    }

    }
    return 0;
    }


    don't know if that's the correct notation for the languages
    associative vector's are also called hash.

    This method allows for easier changes to the input/output set


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,110 Mod ✭✭✭✭Tar.Aldarion


    You aint gonna impress anyone programming in assembler, try programming a friken ARM in C!!!!! TRY IT!!!! ITS UMPOSSIBLE!!!
    Oh it's pointless to do it in c but I will be learning it.


    ASSEMBLY FTW #011h


  • Advertisement
Advertisement