Search found 1739 matches
- Wed Jul 04, 2012 10:55 am
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Ben, I didn't notice your post while I have put my post about ULong, Long and UInt. The unsigned 32-bit variables should be working correctly but the LCD print macros may only support signed 16-bit numbers. To get around this you can use the number to hex function to generate a hex string represe...
- Tue Jul 03, 2012 3:48 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Ben,
Thanks for the immediate response of my post which encourage me to solve the problem. I need ULong for my other projects. It's nice that it really works if I am careful.
Enamul
Thanks for the immediate response of my post which encourage me to solve the problem. I need ULong for my other projects. It's nice that it really works if I am careful.
Enamul
- Tue Jul 03, 2012 3:45 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Ben, I have just found out the solution of the problem.. I am sending you three programs if you can test those in hardware you will be able to see the problem.. In Test1 I have used Count variable as INT and initializes that with 95 and VA as INT and initializes by 345..in this one D is ULong and...
- Tue Jul 03, 2012 3:27 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi, I have multiplied two INT variable and divide them by 800 whose result I put into a ULong variable. e.g., D= (Count*VA)/800 if Count =94, VA = 345, D = 32430/800 = 40 whereas if Count = 95, VA = 345, D = 32775/800= 40 should be but in LCD it shows (-40!!) Then I have tested this eventually chang...
- Tue Jul 03, 2012 3:19 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi,
Yes. I have printed the number using print number LCD macro.
Enamul
Yes. I have printed the number using print number LCD macro.
Enamul
- Tue Jul 03, 2012 2:56 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Martin, I have tested in hardware all new feature of V5 like Uint, Long, ULong. None of them work in hardware although they work in simulation. I have to sort out the problem by changing back to all integer variable. I have noticed that my last version can measure distance precisely but it has lo...
- Tue Jul 03, 2012 1:38 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Martin, Thanks a lot. I have found a problem in Ulong variable just now. Although it should support 32-bit which means 4294967296 could be calculated with this. But I have seen now in hardware it only support 32768..which means that it behaves like normal integer. I am changing my code to adopt t...
- Tue Jul 03, 2012 12:13 am
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Martin, I have modified my last V1 to deal with temperature change. For that, I have now used distance formula, D = ((temp dependent speed)*time of echo)/2. In your v1 and my last post, Count is measuring the number of 100us (actually 92 us implemented in TMR1) which ultimately measures Echo time...
- Sun Jul 01, 2012 3:35 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Martin, Thanks for the nice work. I have manged to improve accuracy in v1 using TMR1 for 100 us time measurement. In fact I have changed to 92us because we are loosing couple of pic cycle due to other commands..so by adjusting few microseconds produce much better accuracy.. I have posted my progr...
- Sun Jul 01, 2012 3:31 pm
- Forum: Programming Tips & Tricks
- Topic: Ultrasonic Distance sensor using HC-SR04
- Replies: 86
- Views: 208260
Re: Ultrasonic Distance sensor using HC-SR04
Hi Martin,
Thanks great work
Enamul
Thanks great work
Enamul
- Sat Jun 23, 2012 5:57 pm
- Forum: Article Discussion
- Topic: MX024 - MIAC Controlled Underfloor Heating System
- Replies: 15
- Views: 31316
Re: MX024 - MIAC Controlled Underfloor Heating System
Hi Ben, I was looking through the Flowcode for Underfloor heating system to extract your software RTC portion for other project. I have found that 183.105Hz TMR0 interrupt frequency for 40MHz crystal has been dealt with tmr_count and tmr_count2 registers where tmr_count has been declared as INT and ...
- Thu Jun 21, 2012 11:18 pm
- Forum: General Programming
- Topic: Matrix PICmicro Programmer message
- Replies: 7
- Views: 5410
Re: Matrix PICmicro Programmer message
Hi Johncrow,
I have faced similar problem...I have manged to solved the problem using your suggestion..
Thanks a lot
Enamul
I have faced similar problem...I have manged to solved the problem using your suggestion..
Thanks a lot
Enamul
- Sat Jun 16, 2012 11:26 am
- Forum: E-blocks
- Topic: EB062 RS485 board bit tricky
- Replies: 9
- Views: 8964
Re: EB062 RS485 board bit tricky
Hi Ben, From this post I think you know that your RS485 board has a connection problem and I think you should add a note on the already produced EB062 boards which you are selling so that whenever anyone buy one he will immediately know the issue. At the same time the problem in your data sheet to c...
- Tue Mar 06, 2012 4:28 pm
- Forum: General Programming
- Topic: I2C between 2 PIC-Micros
- Replies: 21
- Views: 23561
Re: I2C between 2 PIC-Micros
Hi Tiny
I quite new in the Forum..but working with PIC for last 9 years..I was looking for something last night. Glad to see you have made something really useful.
Thank you...I should thank Ben as well as he has directed me from other web page..Thanks Ben..
Enamul
I quite new in the Forum..but working with PIC for last 9 years..I was looking for something last night. Glad to see you have made something really useful.
Thank you...I should thank Ben as well as he has directed me from other web page..Thanks Ben..
Enamul