PSoC™ 4 Forum Discussions
text.format{('custom.tabs.no.results')}
This might be more an Android programming question than PSoC but if anyone has experience with FLOAT data:
Using a characteristic with Field, New Field, Type FLOAT, Length 4.
As suggested here, the float is cast (void) on writing in PSoC:
notificationHandle.value.val = (void *)&Ah;
In Android, reading it with float c = getFloatValue(BluetoothGattCharacteristic.FORMAT_FLOAT, 0);
only gets INFINITY. The data is being transmitted, because if I get it as 4 bytes and convert to IEEE 32 bit float, it's correct (that was a two aspirin coding job for me;)
03-25 19:11:43.158: D/BluetoothGattActivity(6732): AH Got 229,242,63,63
in hex those are: E5 F2 3F 3F
AH should be around 0.752
The above converts to: 0.749800026417
This is more of an observation than a question, but I noticed that Cypress is not in the Bluetooth Developer Portal list of companies that provide Bluetooth Smart development solutions.
They provide a mailto link at the bottom to contact the Developer Site administrator for those who want to be added to the list, and I figured it might be something that made sense for Cypress to pursue.
Show LessVisit the Cypress Video Library or our YouTube channel to view new video tutorials on PSoC 4 BLE.
PSoC 4 BLE 101: 1 Intro to Bluetooth Low Energy
PSoC 4 BLE 101: 2 Configuring a Find Me Profile with BLE
PSoC 4 BLE 101: 3 Finishing the Find Me Application with Firmware
PSoC 4 BLE 101: 4 Adding Battery Level Service and Testing with CySmart
PSoC 4 BLE 101: 5 Using CapSense with Bluetooth Low Energy
PSoC 4 BLE 101: 6 Extending Battery Life with PSoC Low Energy Modes
Show LessHi,
Im having huge trouble trying to interface the newhaven LCD display which has a ST7565P LCD driver to the PSOC 4.
http://www.newhavendisplay.com/nhdc12864a1zfsbfbwhtt-p-3895.html
I have an SPI block and 3 output pins on my "top design"
3 output pins - Reset, A0, CS
On the SPI, i used the mosi (SCL) to connect to the SCL on the LCD, while miso(SDA) to the data pin on the LCD
I have an initialization code that runs like this... I basically took this off newhaven's website..
int main()
{
/* Initialization */
XBEE_Start(); //starts the Xbee UART
SPI_Start();
LCD_Initialization();
...................
}
void comm_out(unsigned char j) //Command Output Serial Interface
{
unsigned int n;
CS_Write(0);
A0_Write(0); //A0 = Command
for(n=0; n<8; n++){
j <<=1;
SPI_mosi_s_Write(0);
SPI_miso_s_Write(j);
CyDelayUs(1);
SPI_mosi_s_Write(1);
}
CS_Write(1);
}
void LCD_Initialization(void)
{
comm_out(0xA0); //RAM->SEG output = normal
comm_out(0xAE); //Display OFF
comm_out(0xC0); //COM scan direction = normal
comm_out(0xA2); //1/9 bias
comm_out(0x2F); //power control set
comm_out(0x21); //resistor ratio set
comm_out(0x81); //Electronic volume command (set contrast)
comm_out(0x2F); //Electronic volume value (contrast value)
}
Hi,
See the attached image. When I am debugging the project, the processor gets inside an if statement that it absolutely should not be able to. I must be missing something very simple, but this is baffling...
Thank you,
Tom
I'm using the MiniProg3 to program my PSoC4200. In the application the PSoC is powered by 5,21V. The program process fails. Acquiring the PSoC device fails.
In the GUI PSoCProgrammer 3.23. the voltage is displayed to be 5000mV. Because the voltage seemed to be a bit high, I lowered the voltage until it is 4,5V. Programming the PSoC at this voltage works. With higher supply voltage the PSoC device can not be acquired.
Settings: Protocol: SWD; Voltage: 5.0V; Connector: 5p and 10p is tested; Programming Mode: Reset
Next step I tried to use 3,3V supply voltage. The settings in PSoCProgrammer is changed to 3,3V. Flashing the device is working without any problems.
The MiniProg is directly connected via 5cm wires to SWDIO, SWCLK and XRES. Voltages are stable (+/-20mV ripple).
Any idea why the PSoC can not be flashed while running with 5V?
Show LessHello ! I am in trouble on programming cy8c4247 in a customer board. I have installed latest psoc3.2, psoc programmer and mini prog3 driver, but when i push the "program" button in psoc3.2, there are warning tips "Warning: dbg.M0044: There was an error applying settings to the device. The device may be in use by another application." and "Warning: dbg.M0039: There was an error running port acquire: Device can be acquired in SWD/JTAG mode only." I come here for help, how can i fix this problem?
Show LessHi,
According to the documentation for the block, the CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP event should be called when advertisement starts or stops. But if I run my code with the debugger on my CY8CKIT-042-BLE board, a breakpoint in the event is triggered over and over, with almost no time in between. Can anyone please tell me why this is happening ?
I'm using the attached code on a PRoC BLE module. At this point, there isn't much of my code left. The only thing on my TopDesign schematic is the BLE block (v2.00).
Show Less