Jump to content
  • 0

Nexys 3 Pmod Nav Problem


NiLo

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

   

  

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...