Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Defining LSBs as units

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-23-2013
04:47 PM

09-23-2013
04:47 PM

Defining LSBs as units

I am working with some simple circuitry that generates signals to be analyzed by a microprocessor. I have set up the equations in Mathcad Prime 2.0 and of course the results are in volts. I would however like to convert the output voltages to LSBs (Least Significant Bits). I can of course simply multiply the voltage by 1024/3.3 volts and add the units in text. I would like to use LSBs because the microprocessor data sheet states A/D errors as LSBs.

I have tried to define a unit called LSB but for some reason I can't get it to work. I thought all I had to do was type in the unit and define it using the colon to the expression I want it to equal. I.E. LSB:1024/3.3V. Sometimes I can be rather dense but when I try to use this unit it tells me the unit is not defined. I thought that was what I was doing.

Once I get through this stage I can worry about whether to set up the units expression to truncate my results or round off the results. Right now I'll settle for the 3 digits past the decimal just being there.

If I was still doing this on a calculator I wouldn't have to worry about units but then every time I wanted to change a resistor value I would have to recalculate the whole thing.

If someone could point out the error of my ways I would appreciate it.

Thanks,

Larry

Labels:

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-23-2013
05:39 PM

09-23-2013
05:39 PM

Re: Defining LSBs as units

Something like the attached?

Don't forget to change "LSB" to a UNIT in the style section located in the Math tab. LSB initally is considered a variable.

I hope this helps.

Norm

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

09-24-2013
09:17 AM

09-24-2013
09:17 AM

Re: Defining LSBs as units

If you are using 15, then try LSB := 3.3V/1024. (You want to equate the least bit with an equivalent voltage.)

If you are using Prime, then you need to worry about declaring it a unit as Norm discussed.