Search found 190 matches

by viki2000
Mon Nov 13, 2017 2:43 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

Here is a test code with the updated component: PIC16F1829_LCD_4x20_BME280.fcfx Here is a test code with the updated component using Arduino Uno R3, OLED SH1106 128x64 and BME280. It sends data also serial to PC: Arduino_UNO_R3_BME280.fcfx It shows similar data as Arduino sketch with Adafruit BME280...
by viki2000
Mon Nov 13, 2017 2:42 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

Hi Ben, I think I fixed it by comparing with CCS code. Here is he test/debug code used: PIC16F1829_BME280_3.fcfx Here is the code for the component: BME280_2.fcfx Here is the the component: BME280_2.fcpx Please check it by yourself and make the improvements that you consider necessary. For example i...
by viki2000
Sat Nov 11, 2017 9:55 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

I do not know about you guys, but when I encounter something that does not work I stress myself and the adrenaline goes up as I would be “two steps from hell” and I feel like in an epic movie: https://www.youtube.com/watch?v=PKC_RQtvAR0 and then I can focus lots better; in the end I am tired, but th...
by viki2000
Sat Nov 11, 2017 7:37 pm
Forum: Poll Discussion
Topic: What improvements would you like to see?
Replies: 16
Views: 16240

Re: What improvements would you like to see?

This is a simple and a helpful one, unless is already implemented and I do not know how to activate it: - In the main window where the code for different macros is written, in case there is a long flowchart code, it would be very helpful to have a scroll bar at the right side. Now I find it difficul...
by viki2000
Fri Nov 10, 2017 12:47 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

The humidity is solved too. It was a bigger headache to trace down the problem. In the “ReadHumidityFloat” macro, the error came from C code of “v_x1_u32r” variable calculations. I had to split that impossible equations in many simple calculations and check the evaluation of each expression. With so...
by viki2000
Thu Nov 09, 2017 3:33 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

For humidity the “.Return = (.Return >> 8) | (.Return << 8)” must be disabled in “I2C_Read2_Register” otherwise the TFINE gives wrong values. So, maybe 2 macros “I2C_Read2_Register” must be written, one for temperature and one for humidity. Or another options is to write in Read Calibration macro, a...
by viki2000
Thu Nov 09, 2017 2:26 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

Hi, I spent some good hours trying to find the bug in the code from BME280 component. I think I found something and I would like to share it in order to have a final good component done by Ben. First of all, I think it would be good if the component would have as parameters the oversampling and norm...
by viki2000
Wed Nov 08, 2017 4:21 pm
Forum: Bug reports
Topic: FC7 - Global Options and Print missing or hidden
Replies: 1
Views: 2479

FC7 - Global Options and Print missing or hidden

I checked next pages: https://www.matrixtsl.com/wikiv7/index.php?title=Global_Options#Print_in_color https://www.matrixtsl.com/wikiv7/index.php?title=Printing_Flowcharts In my case I do not have/see the Print option and in the Global Options Application Tab I have fewer options to check. What settin...
by viki2000
Wed Nov 08, 2017 2:07 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

I would like to confirm the code used in CCS compiler in the 1st link above. I have tested it with PIC16F1829, BME280 address 0x76 (0xEC) and a LCD display 2x8. I was interested only in temperature and humidity. The code provides meaningful data/info on display, similar with Arduino code. The setup ...
by viki2000
Sat Nov 04, 2017 7:40 am
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

There is one more piece of code, besides the known Arduino library and inspired from Arduino library, that can be used as comparison to fix the Flowcode BME280 component. That is next CCS complier C code, at the bottom of next page, which is said that works, but I have never tested it myself: http:/...
by viki2000
Fri Nov 03, 2017 3:34 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

Re: BME280 Pressure Sensor

I have realized that right after I have posted the question, so I deleted my comment about the compensation before you explained/answered it.
Then it seems the Arduino code library must be studied deeper and the code from there better transposed in Flowcode BME280 component.
by viki2000
Fri Nov 03, 2017 12:58 pm
Forum: General Programming
Topic: BME280 Pressure Sensor
Replies: 45
Views: 46419

BME280 Pressure Sensor

I use Flowcode 7.2.1 professional version purchased few months ago and BME280 is included at the Sensors as Pressure Sensor, but the Wiki Help page shows nothing. I decided to give it a try. In order to avoid any future discussion about wirings, I used Arduino Uno and Arduino Mega 2560 together with...
by viki2000
Thu Sep 28, 2017 9:49 pm
Forum: General Programming
Topic: Custom Interrupts – PICmicro – Explanations
Replies: 7
Views: 6340

Re: Custom Interrupts – PICmicro – Explanations

Thank you very much for the explanations. You brought light into the subject. Nr. 2 is clear now. Nr.3 and 4. are clear for FC7. Would it be possible to explain "FCM_%n();” as I asked in the previous questions for Flowcode 6 and/or Flowcode 5? P.S. How do I say thanks (thumbs up) in the new forum in...
by viki2000
Wed Sep 27, 2017 9:21 pm
Forum: General Programming
Topic: Custom Interrupts – PICmicro – Explanations
Replies: 7
Views: 6340

Re: Custom Interrupts – PICmicro – Explanations

The I2C interrupt is a good example for custom interrupt. I am glad you picked it up. The Flowcode 7 has the extension .fcfx for the files, the same as Flowcode 6. The Flowcode 5 I think has the extension .fcf. The interrupt icon was present on Flowcode 5 and the I2C interrupt on Slave I2C was done ...
by viki2000
Tue Sep 26, 2017 10:54 am
Forum: General Programming
Topic: Custom Interrupts – PICmicro – Explanations
Replies: 7
Views: 6340

Re: Custom Interrupts – PICmicro – Explanations

Hi, Thank you for the suggested code. Unfortunately I cannot test it now. I can test it only in 4-5 weeks from now on. Looking at the suggested code I can only make for the moment next observations: - In the Disable Code area of the Interrupt, I think it should be “cr_bit(PIE1, SSPIE);” or “PIE1.SSP...
by viki2000
Fri Sep 22, 2017 9:14 am
Forum: General Programming
Topic: Custom Interrupts – PICmicro – Explanations
Replies: 7
Views: 6340

Custom Interrupts – PICmicro – Explanations

I am looking at Wiki help next pages: https://www.matrixtsl.com/wikiv7/index.php?title=Custom_Interrupts_-_PICmicro https://www.matrixtsl.com/wikiv7/index.php?title=Custom_Interrupts_-_dsPIC/PIC24 Could you please explain it with details and simple next questions from “Handler code”: 1) When is that...
by viki2000
Fri Sep 22, 2017 8:08 am
Forum: General Programming
Topic: OLED 4x20 – Cursor does not work
Replies: 1
Views: 2129

Re: OLED 4x20 – Cursor does not work

I noticed the same problem was asked here:
viewtopic.php?f=54&t=18325
by viki2000
Thu Sep 21, 2017 3:14 pm
Forum: General Programming
Topic: OLED 4x20 – Cursor does not work
Replies: 1
Views: 2129

OLED 4x20 – Cursor does not work

I have the next alphanumeric OLED 4x20: http://www.tme.eu/en/details/rec002004aypp5n0/alphanumeric-oled-displays/raystar-optronics/rec002004aypp5n00000/ I have tested it briefly in the past here: https://www.matrixtsl.com/mmforums/viewtopic.php?f=7&t=15450 I used LCD Generic, then I tried Adafruit O...
by viki2000
Mon Sep 18, 2017 12:38 pm
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

For who is interested, I have tried also PIC18F4550 on the same breadboard and works, of course with a bit different settings for ports, register for pull-up resistors and oscillator. This time I used an external crystal 16MHz and with internal PLL I have 48MHz clock for CPU. I use PORTB to read the...
by viki2000
Mon Sep 18, 2017 8:02 am
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

Today in the morning I solved the problem. For debugging I have done next: - Removed the Salve chip and I noticed with the oscilloscope that the Master is sending continuously I2C signals SCL and SDA as address, but no ACK from Slave. - The communication works one time at power on moment, after whic...
by viki2000
Fri Sep 15, 2017 11:33 am
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

Now that the first example works, I decided to try the 2nd example: “The slave device is connected to a bank of LEDs, the master device to a bank of switches. The value of the switches is passed to the slave LEDs” from Wiki Help page: https://www.matrixtsl.com/wikiv7/index.php?title=Component:_ID_ea...
by viki2000
Thu Sep 14, 2017 1:27 pm
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

Here are the working codes used in the above test: PIC16F1937_I2C_Master_Read_good.fcfx PIC16F1937_I2C_Slave_switches_good.fcfx Looking at the last breadboard photo above: - The Master is on the left side and has LEDs attached to the PORTB: - The Slave is on the right side and has dip-switches attac...
by viki2000
Thu Sep 14, 2017 11:31 am
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

The circuit works now. The last problem was related with pull-up resistors on PORTB, because I did not use any external resistors attached to the dipswitches. It works also if I use 4.7K resistors for MCLR instead of 10K and if I use 4.7K resistors of I2C resistors instead of 3.3K. It works also if ...
by viki2000
Wed Sep 13, 2017 3:35 pm
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

Here is a short update, it seems I arrived somewhere. I followed your suggestions: I connected both Vdd/Vcc, then I changed the MCLR resistors to 10K and pull-up resistors to 3.3K. But I think these did not make any changes. Then I tried your proposed code “PIC16F1937_I2C_Slave_switches2 counter.fcf...
by viki2000
Wed Sep 13, 2017 1:12 pm
Forum: General Programming
Topic: PIC to PIC over I2C – Default Examples
Replies: 27
Views: 24035

Re: PIC to PIC over I2C – Default Examples

Then I have made the electrical diagram below in a photo editor, which reflects better the connection from real breadboard. Here we may object to the missing pullup resistors to 5V on the dip-switches, so when the switches are opened, then the inputs are in an uncertain state. But we can enable the ...