• 0
NiLo

Nexys 3 Pmod Nav Problem

Question

Hi,

I am doing a project on Nexys 3 FPGA board and I am trying to connect Pmod Nav in order to display barometric pressure on PmodOLEDrgb.

I am in trouble with Pmod Nav. I have created a Controller that reads via SPI Protocol the 24 bits of 3 data registers and then I have divided this result with value 4097 counts/hPa as it is mentioned in LPS25HB, in order to take the absolute pressure in hPa. The final value should be in range of 260- 1260 hPa. 

The problem is that the final absolute value of barometric pressure, that I take, is 4095, which means that all bits are stored in 3 registers PRESS_OUT_H, PRESS_OUT_L  and PRESS_OUT_XL take the value of '1'. 

The pins that I have connected are  SDI, SDO, SPC, CS_ALT.

I have no idea on how to deal with this problem.

I would appreciate if someone helped me.

Thank you

Nik

   

  

Edited by NiLo

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @NiLo,

Here is the Vivado Library which has IP cores for most of our Pmods including the PmodNAV. I would look at our driver to see how we solved this. I would look at the following functions in the PmodNAV.c.

Spoiler

//---- Altimeter functions

int NAV_ReadPressure(PmodNAV* InstancePtr);

void NAV_ReadPressurehPa(PmodNAV* InstancePtr);

void NAV_ReadTempC(PmodNAV* InstancePtr);

u8 NAV_TempAvailableALT(PmodNAV* InstancePtr);

u8 NAV_DataAvailableALT(PmodNAV* InstancePtr);

void NAV_ConfigIntALT(PmodNAV* InstancePtr, u8 bIntGen, u8 bActiveType,

u8 bOutputType, u8 dataSignalVal, bool intEnable, bool latch, u8 intLevel);

void NAV_SetIntThresholdALT(PmodNAV* InstancePtr, float thVal);

u8 NAV_GetIntSrcALT(PmodNAV* InstancePtr);

I would also look at the following functions in main.c

Spoiler

float NavDemo_ComputePref(float hPa, float altitudeMeters);

float NavDemo_ConvPresToAltF(float Pref, float hPa);

float NavDemo_ConvPresToAltM(float Pref, float hPa);

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi, @jpeyron

Thanks a lot for your immediate response. I am writing this project in Verilog. 

I would take a look to the Altimeter functions that you mentioned and in case you find something more it would be very useful to me.

Thank you

Nik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now