comparing characters from strings

Discussion in 'VHDL' started by sagar0205, Aug 8, 2012.

  1. sagar0205

    sagar0205

    Joined:
    Aug 8, 2012
    Messages:
    4
    hi
    i need to write code for sdi 12 protocol
    module (dataline,sensor_out);
    inout [31:0]dataline;--
    in [31:0]sensor_out;

    I want to compare the strings recieved from the dataline
    if input from dataline is aM! -- a is address of sensor, M is measurement request,! is stop.
    then i want to compare the address a (there are 10 sensors whose address will be a,b,c,d.....j) whether it belongs to the current sensor.

    then i want to compare the second character i.e, M (we have different commands like M for measurement, D for data request, C for concurrent measurements, R for Continuous Measurements..)

    if it is M then i want to store sensor_out in a register,
    if it is D then i want to transmit stored sensor_out to dataline
    sagar0205, Aug 8, 2012
    #1
    1. Advertising

  2. sagar0205

    sagar0205

    Joined:
    Aug 8, 2012
    Messages:
    4
    just give me hint to transmit data(text) serially and to store it in a memory character wise
    sagar0205, Aug 8, 2012
    #2
    1. Advertising

  3. sagar0205

    imed

    Joined:
    Aug 6, 2012
    Messages:
    7
    Hi!
    I don't see why don't you use ascii code in hexdecimal.
    imed, Aug 8, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. kaeli
    Replies:
    8
    Views:
    580
    Chris Smith
    Nov 18, 2004
  2. HS1

    Comparing two strings

    HS1, Nov 28, 2004, in forum: Java
    Replies:
    3
    Views:
    443
    Rob van der Leek
    Nov 29, 2004
  3. Nicholas

    Comparing char* with integers and characters

    Nicholas, Sep 9, 2003, in forum: C Programming
    Replies:
    13
    Views:
    600
    Nicholas
    Sep 9, 2003
  4. Rick

    Comparing strings from within strings

    Rick, Oct 21, 2003, in forum: C Programming
    Replies:
    3
    Views:
    366
    Irrwahn Grausewitz
    Oct 21, 2003
  5. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    730
    Malcolm
    Jun 24, 2006
Loading...

Share This Page