Search found 9 matches

by Richard
Tue Apr 04, 2017 1:51 am
Forum: Flowcode V6
Topic: Trying to connect mcp23017 to 16f877a using i2c
Replies: 2
Views: 3926

Re: Trying to connect mcp23017 to 16f877a using i2c

Thanks. I am familiar with I2C, but the 23017 is a little different as it has 2 internal registers for the ouputs, so it appears the "sendbytetransaction" won't work. I will just have to "transmitbyte" everything.

Richard
by Richard
Mon Apr 03, 2017 4:53 am
Forum: Flowcode V6
Topic: Trying to connect mcp23017 to 16f877a using i2c
Replies: 2
Views: 3926

Trying to connect mcp23017 to 16f877a using i2c

Hi, I am trying to connect 4 individual mcp23017 expansion chips to a 16f877a using I2C. I have dip switches for the A0, A1,A2 pins to set the address on each chip, with 5.6K pulldown resistors. The Reset pin on the 23017 is connected to 5v. I have pull-ups on the I2C lines. All I am using it for is...
by Richard
Mon Jan 25, 2016 4:06 am
Forum: Flowcode V6
Topic: I need to divide an Integer by 2048 and display as a decimal
Replies: 1
Views: 2057

Re: I need to divide an Integer by 2048 and display as a dec

I figured out how to do it, only using integers. I created 3 loops, one to figure out the whole number, passed on the remainder, one for the tenths, passed on the remainder, and one for the hundredths. Once I figured it out, it is quite simple (what isn't), and can be used for any base number to be ...
by Richard
Mon Jan 25, 2016 1:00 am
Forum: Flowcode V6
Topic: I need to divide an Integer by 2048 and display as a decimal
Replies: 1
Views: 2057

I need to divide an Integer by 2048 and display as a decimal

Hi, I am sampling an accelerometer and placing the result in an integer (AccelMax). The accelerometer represents 0 G's as 0 counts, and 16 G's as 32767 (2048 counts per G) If I just divide the integer (AccelMax) by 2048, it rounds it off down to the nearest whole integer. I need to be able to show a...
by Richard
Thu Jan 14, 2016 2:42 am
Forum: Flowcode V6
Topic: Read data from MPU-6050 accelerometer using I2C
Replies: 4
Views: 7821

Re: Read data from MPU-6050 accelerometer using I2C

I figured it out. In the MPU-6050 component in Flowcode, I was using the "channel 1" setting instead of "software". My sample rate instantly jumped from 47 to 117 samples/sec. I then tried changing the uC clock back up to 8Mhz, and my sample rate went up to 937 samples/sec. Once I take my test outpu...
by Richard
Wed Jan 13, 2016 10:05 pm
Forum: Flowcode V6
Topic: Read data from MPU-6050 accelerometer using I2C
Replies: 4
Views: 7821

Re: Read data from MPU-6050 accelerometer using I2C

Thanks for the response. I was able to get the 6050 to communicate with the uC, but it is only sampling approximately 46 times per second. I have included my code again so you can see what I have done. In my sampling loop, I am turning an output on, and then immediately off, and using my oscilliscop...
by Richard
Mon Jan 11, 2016 5:53 am
Forum: Flowcode V6
Topic: Help with warnings
Replies: 3
Views: 3560

Re: Help with warnings

Hi Peter,

Can you post your code please so we may be able to help.

Richard
by Richard
Sun Jan 10, 2016 10:29 pm
Forum: Flowcode V6
Topic: flow chart printing
Replies: 5
Views: 5043

Re: flow chart printing

You can also just have your chart displayed, click "Print Screen" on your keyboard. This takes a screenshot and saves it to the clipboard. You then open paint, click paste, save the file, and print it on any machine.

Richard
by Richard
Sun Jan 10, 2016 7:45 pm
Forum: Flowcode V6
Topic: Read data from MPU-6050 accelerometer using I2C
Replies: 4
Views: 7821

Read data from MPU-6050 accelerometer using I2C

Hi, I am not new to flowcode but this is my first post and I am new to I2C. I am trying to connect an MPU-6050 accelerometer to a pic 16f1829. The application is I have the accelerometer attached to a platform, that we drop a weight onto. I need to be able to measure the impact G forces and display ...