Search found 41 matches

by Francesco.C
Mon Aug 29, 2011 4:26 pm
Forum: Modules
Topic: ADC readings are unstable!
Replies: 2
Views: 3081

ADC readings are unstable!

Hi guys, can you have a look at this code and telle me if there is something wrong please? The readings frm the ADC are a little unstable. I first connected a temperature sensor to AN0 and found the readings were unstable. Then, thinking the sensor was noisy, a connected a variable resistor insted. ...
by Francesco.C
Thu Aug 25, 2011 5:59 pm
Forum: Modules
Topic: How can you substitute a string on USART output?
Replies: 3
Views: 2824

Thank you octal,
your code works fine.

I will read a little more about constants now.

Regards

Francesco
by Francesco.C
Wed Aug 24, 2011 10:29 pm
Forum: Modules
Topic: How can you substitute a string on USART output?
Replies: 3
Views: 2824

How can you substitute a string on USART output?

Hi guys, I have a serial device connected to the PIC USART. This devive expects commands that are very short and have no real meaning. For example; the command to litght-up a digit is 'bn0'. This has no real meaning and i would like to substitute it with 'Digit0'. So that when i send 'Digit0' over t...
by Francesco.C
Sun Aug 21, 2011 6:50 pm
Forum: Modules
Topic: Formatting USART.Write
Replies: 4
Views: 3014

Thanks David for the hint. I have found my solution. like this: --------------------------------------------------------- MyVar=1234 USART.Write(Mid(DecToStr(MyVar),0,2),10,13) ------------------------------------------------------ Using string function 'Mid' I can print any portion of may variable....
by Francesco.C
Thu Aug 18, 2011 7:24 pm
Forum: Modules
Topic: Formatting USART.Write
Replies: 4
Views: 3014

Formatting USART.Write

Hi, If I have: ....................................... Dim myvar as Word myvar=1234 USART.Write (DectoStr(myvar,1)) ................................................... I get '4' which is the last character in the string. What do I have to write to get the first and/or second character in the string?...
by Francesco.C
Thu Jul 28, 2011 8:30 pm
Forum: Modules
Topic: Usart Module Error when Using PIC18F1330
Replies: 3
Views: 3076

Thank you octal, it works.

Regards

Francesco
by Francesco.C
Wed Jul 27, 2011 8:23 pm
Forum: Modules
Topic: Usart Module Error when Using PIC18F1330
Replies: 3
Views: 3076

Usart Module Error when Using PIC18F1330

Hi there, I have just started to write a comms application using PIC18F1330. The compiler stop with an error in the USART module at line 69 thus: "RCInput As TRISC.Booleans(7)," It looks as if it doed not support the above device!! Or maybe I am missing something obvious. Can you help please? Regard...
by Francesco.C
Thu Jul 29, 2010 5:14 pm
Forum: Wiki Announcements
Topic: PIC and WIFI question!
Replies: 3
Views: 7260

Thanks for the advice.
I was away hence the delay in replying.

I have done some investigation and I have a better idea what to do.
I think I will be able to write some code using VB.net.

Regards

Francesco
by Francesco.C
Sun Jul 25, 2010 4:33 pm
Forum: Wiki Announcements
Topic: PIC and WIFI question!
Replies: 3
Views: 7260

PIC and WIFI question!

Hi,

I was thinking of sending commans to a PIC using WIFI from my laptop, directly.

Is this possible? If so can you get me started by telling me wha do I need to do start this project?

Regards

Francesco
by Francesco.C
Sun Jul 04, 2010 6:09 pm
Forum: Compiler
Topic: Strange Duty Cycle!!
Replies: 2
Views: 2230

Thank You Jerry, it works. :D

Regards

Francesco
by Francesco.C
Sat Jul 03, 2010 4:54 pm
Forum: Compiler
Topic: Strange Duty Cycle!!
Replies: 2
Views: 2230

Strange Duty Cycle!!

Hi guys, Can you please take a look at this code and tell me why I do not get the result I expect? I am trying to controll a fan and a MOSFET device using PWM. I have used 'PicCalc' for my calculation. The set frequency is 1Khz with a changing duty for controlling the devices. If for example I set t...
by Francesco.C
Fri Jun 11, 2010 5:23 pm
Forum: Compiler
Topic: New to I2C. Need some help!
Replies: 6
Views: 4248

THANK YOU RKP, It Works :D :D

Regards

Francesco
by Francesco.C
Thu Jun 10, 2010 9:46 pm
Forum: Compiler
Topic: New to I2C. Need some help!
Replies: 6
Views: 4248

Sorry about that! Here is the code. Thanks // set clock and osc... Device = 18F242 Clock = 4 // import modules... Include "usart.bas" Include "convert.bas" Include "I2C.bas" Include "utils.bas" Dim TEMP_Val_LSB, TEMP_Val_MSB As Byte Const SE95_addr = %10010000 ' Address of SE95 temperature sensor Co...
by Francesco.C
Thu Jun 10, 2010 8:19 pm
Forum: Compiler
Topic: New to I2C. Need some help!
Replies: 6
Views: 4248

Thank a lot RKP, I followed your advice and I managed to read the ID register. So I got ambitious now and tryed to read the temperature register. I can read one of the byte but the other gives me FF. According to the timing diagramm of the data-sheet I have to read the two bytes as I have done in th...
by Francesco.C
Wed Jun 09, 2010 9:58 pm
Forum: Compiler
Topic: New to I2C. Need some help!
Replies: 6
Views: 4248

New to I2C. Need some help!

Hi guys, Please can you take a look at my code below? I am writing my first I2C code. I am trying to read the ID register of a SE95 (a temperature sensor device) I should get 'A1h'. All I get are 'FF'. Can you put me on the right track? Thanks Francesco { ********************************************...