Search found 27 matches

by Maged A. Mohamed
10 Nov 2015 10:21
Forum: mikroBasic PRO for AVR General
Topic: Unable to read 1 on PROTB pin
Replies: 2
Views: 2650

Re: Unable to read 1 on PROTB pin

Thanks very much for your help and support, I tried it from the help files and did not work after a long trial and reading help files and data sheet, I found my problem this morning in a noisy power supply I did NOT expect noise affect a function while all others OK, I expected reset or erratic beha...
by Maged A. Mohamed
07 Nov 2015 08:28
Forum: mikroBasic PRO for AVR General
Topic: Unable to read 1 on PROTB pin
Replies: 2
Views: 2650

Unable to read 1 on PROTB pin

Hi, I use 3 different ATmegaA chips to keep track of last modifications. In the attached program I need to read digital input on portb pins 2 and 4, it always read zero even I hardwire the pin Hi the code worked ok for PIC in another application but here it does not. I tried while FerrIn wend, also ...
by Maged A. Mohamed
12 Aug 2015 19:59
Forum: mikroBasic PRO for PIC General
Topic: I can't make 2 sensors work together
Replies: 2
Views: 1567

Re: I can't make 2 sensors work together

Dear Mitrovic,
Thanks very much I just did now and will try and come back
Best regards
Maged
by Maged A. Mohamed
11 Aug 2015 17:40
Forum: mikroBasic PRO for PIC General
Topic: I can't make 2 sensors work together
Replies: 2
Views: 1567

I can't make 2 sensors work together

I need to attach 2 HDT22 to PIC16F877A and get the average reading. I copied and pasted the function sub function DHT_Read1 () as byte ' returns FF for faulty otherwise 0 and modified it thorough to be sub function DHT_Read2 () as byte ' returns FF for faulty otherwise 0 The first works and the seco...
by Maged A. Mohamed
05 Aug 2015 12:53
Forum: mikroBasic PRO for PIC Wish List
Topic: Break with lable option
Replies: 1
Views: 2388

Break with lable option

Thanks for great products My idea is for all compilers it is Break Command with optional lable This is current Break in a body of a sub or function result = $FF for i = 0 to 180 ' Wait for hi if DHT2_Data then result=0 break end if next i if result = $FF then exit end if ' Bad sensor "we need this s...
by Maged A. Mohamed
04 Aug 2015 07:29
Forum: mikroBasic PRO for PIC General
Topic: LoWord and HiWord issue
Replies: 16
Views: 7216

Re: LoWord and HiWord issue

Thanks for interest and probably also machine/driver dependent
Best regards
by Maged A. Mohamed
03 Aug 2015 08:41
Forum: mikroBasic PRO for PIC General
Topic: LoWord and HiWord issue
Replies: 16
Views: 7216

Re: LoWord and HiWord issue

Hi All I appreciate your thorough discussion, as I am not as specialized as you are, but I feel like to comment on some notes I wrote this program like I said in the 1st post to read humidity and temperature from 2 sensor each gives one 48 bit value, 16 for H, 16 for T and 16 for CRC, I read only 32...
by Maged A. Mohamed
02 Aug 2015 18:47
Forum: mikroBasic PRO for PIC General
Topic: LoWord and HiWord issue
Replies: 16
Views: 7216

Re: LoWord and HiWord issue

both became 110, I think something is wrong with my PC Nothing's wrong with your computer. You've probably upgraded to mB version 6.6.2 which (again) hasn't been preceded by any beta-tests and now exhibits unintended side effects of improvements that, most probably, seemed innocuous enough to devel...
by Maged A. Mohamed
02 Aug 2015 14:34
Forum: mikroBasic PRO for PIC General
Topic: LoWord and HiWord issue
Replies: 16
Views: 7216

Re: LoWord and HiWord issue

Thanks a lot for your help I re-tried the following program HiWord_LoWord ' Declarations section dim TT as longint S1H, S1T as word main: ' Main program TT = 14483566 ' This is the result of TT from above 2 assignments, if we comment this line, it works fine S1H = Hiword(TT) ' S1H becomes 221 S1T = ...
by Maged A. Mohamed
02 Aug 2015 11:02
Forum: mikroBasic PRO for PIC General
Topic: LoWord and HiWord issue
Replies: 16
Views: 7216

LoWord and HiWord issue

Please I read 32 bits from sensor then split them to 16 for T and 16 for H I found my problem in the LoWord and HiWord results. So I commented the whole function and made this function compose a longinteger (TT) for 221 and 110 values It come up with 14483566 If I use the same function to split, the...
by Maged A. Mohamed
02 Aug 2015 09:10
Forum: mikroBasic PRO for PIC Wish List
Topic: The ability to go back or jump to line number
Replies: 1
Views: 2302

The ability to go back or jump to line number

Hi, Sometimes one write some where deep some typo mistakes a wrong value or instruction like LoWord instead of Lo, and want to correct that and do the correct steps I know it is difficult to save the micro data so going back puts the correct data in place, but in many cases the mistake in area of as...
by Maged A. Mohamed
31 Jul 2015 17:16
Forum: mikroBasic PRO for PIC Wish List
Topic: The cfg file be local
Replies: 1
Views: 2406

The cfg file be local

Thanks for great products, my topic is for all compilers.. I wish 2 things 1- the configuration file be local , I leave "C:" for windows only so when it crashes and it will , I format it with no tears, so I choose always to have the configuration local so I do not loose then when I reload the image ...
by Maged A. Mohamed
21 Jul 2015 12:55
Forum: mikroBasic PRO for PIC General
Topic: How I can specify port pin inside a procedure or functiom
Replies: 4
Views: 1967

Re: How I can specify port pin inside a procedure or functio

Thanks very much.
I made some comments inside to explain more my question.
The attached compiles with no error but is it legal? I mean work as expected?
Best regards and thanks very much.
The other parts of code may have some bugs, I am working on it.
by Maged A. Mohamed
19 Jul 2015 10:23
Forum: mikroBasic PRO for PIC General
Topic: How I can specify port pin inside a procedure or functiom
Replies: 4
Views: 1967

How I can specify port pin inside a procedure or functiom

Hi, I need to read 2 humidity sensors and calculate their average. I thought I make one procedure and let it do the job. 1st I can not pass a bit (bit or sbit) to a procedure, I said OK I pass a byte "Sel_Sncr" carrying 1 or 2 the problem is.. IF Sel_sencr = 1 then else ..... will result in full dup...

Go to advanced search