Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > comparing characters from strings

Reply
Thread Tools

comparing characters from strings

 
 
sagar0205 sagar0205 is offline
Junior Member
Join Date: Aug 2012
Posts: 4
 
      08-08-2012
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
 
Reply With Quote
 
 
 
 
sagar0205 sagar0205 is offline
Junior Member
Join Date: Aug 2012
Posts: 4
 
      08-08-2012
just give me hint to transmit data(text) serially and to store it in a memory character wise
 
Reply With Quote
 
 
 
 
imed imed is offline
Junior Member
Join Date: Aug 2012
Posts: 7
 
      08-08-2012
Hi!
I don't see why don't you use ascii code in hexdecimal.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strings, Strings and Damned Strings Ben C Programming 14 06-24-2006 05:09 AM
Comparing two strings HS1 Java 3 11-29-2004 04:21 PM
Which way is more efficient - comparing strings of different letter casing kaeli Java 8 11-18-2004 09:44 PM
Comparing strings from within strings Rick C Programming 3 10-21-2003 09:10 AM
Comparing char* with integers and characters Nicholas C Programming 13 09-09-2003 03:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57