Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 06, 2016, 10:44:04 22:44


Login with username, password and session length


Pages: [1]
Print
Author Topic: Strange MikroBasic for PIC ...  (Read 3049 times)
0 Members and 1 Guest are viewing this topic.
orpheedulogis
Junior Member
**
Offline Offline

Posts: 61

Thank You
-Given: 9
-Receive: 1


« on: January 08, 2010, 01:44:16 01:44 »

(with PIC18F4450, Serial int but no ADC)

After many hours searching were I had a problem I doesn't found anything ... except I had to add a line in a new stupid procedure which doesn't serve for anything !

Notice I use Isis with Mikrobasic. Datas are sent to Oled module.

Strange isn't it ?

Here is my problem: I take serial PIC informations,  modify them in byte format and transmit them as string to another microcontroler.
It seem to work but I add test mode so I can read a simulation string to see if it works correctly with specific datas (negative datas, high and low values...).
I found I was not sending correct datas just in simulation mode.
So, first, I had a LCD on Isis schematic to see exactly what I was sending.
The problem I found is that , when I add decode line procedure, everything works correctly !
So I decided to substract line by line so I can find where was the problem.
Here is the code who works:

Dim StringValue as string[5]
Dim CodeDatas as string[70]

.........

sub procedure LostTimeForWhat

wordtostr(10,StringValue)

end sub

'--------------------------------------

sub procedure WriteCodeDatas

UART1_Write_Text (CodeDatas)
delay_ms(200)
LostTimeForWhat

end sub

'-------------------------------------

Now it works but ... how for how long ?
Notice if I add the line "wordtostr(10,StringValue)" directly in WriteCodeDatas procedure it doesn't work ! if you add for next or Delay... it doesn't work too.
Strange case isn't it ?
« Last Edit: January 08, 2010, 01:52:32 01:52 by orpheedulogis » Logged
orpheedulogis
Junior Member
**
Offline Offline

Posts: 61

Thank You
-Given: 9
-Receive: 1


« Reply #1 on: January 13, 2010, 04:04:44 04:04 »

Many days after it's always works even if I added new procedures. I just have to let this "LostTimeForWhat" procedure.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC