Pumpkin, Inc.

Pumpkin User Forums

How to transfere variable to MESSAGE

If you can't make Salvo do what you want it to do, post it here.

How to transfere variable to MESSAGE

Postby luben » Sun Jul 21, 2002 5:48 am

Hello,

Yes.... I was totally forgotten that the messages holds the values not in variables, but into pointers.. so I have to bring the address of the pointer. I'm sorry.. moment laps of memory :-)

The bugs into ICD2 are not so big to force me to go down to C18. Microchip are good in creating hardware, but I'm afraid that they have problems with the software - let's bring our trust to HiTech - always reliable, with good support and what's more important - with more featutes compiler.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: How to transfere variable to MESSAGE

Postby luben » Sun Jul 21, 2002 10:36 am

Hello,

I have problems when transfering values from unsigned char variable to message pointer.
If I declare variable :

static byte dina; // where to keep data from RS232

dina = RCREG; // read RS232 data and then proceed it

and after that I want to signal message like:

OSSignalMsg(MSG_Action,(OStypeMsgP)dina); // signal the message

I receive errors. I tried almost all possible variants in vain - or I get error message that it's incorect conversion, or "can't generate code for this expression". I know that this is connected with the typecasting, but I can't get the right answer.

In addition I became nervous with the new ICD2 debbuger - it has so many bugs (more of them not so fatal), that I it's too hard to build something working with PIC18 and ICD2. But for sure ICD2 is useful and very cheap device.


Best regards
Luben


luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: How to transfere variable to MESSAGE

Postby aek » Sun Jul 21, 2002 10:48 am

Hi Luben.

I think you want

code:
OSSignalMsg(MSG_Action,(OStypeMsgP) &dina); // signal the message

Regards,

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: How to transfere variable to MESSAGE

Postby aek » Sun Jul 21, 2002 10:51 am

Hi Luben.

Have you tried ICD2 with MPLAB v6?

You would need MPLAB-C18, though. You could use the MPLAB-C18 demo version with Salvo as long as you download the Salvo Pro for PICmicro(R) MCUs patch from our website -- it has the libraries for MPLAB-C18 v2.

We have used MPLAB v6 + MPLAB-C18 + ICD2 + PICdem.net here in the lab and once we got all the software versions right, it works pretty well.

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 2 guests

cron