RS232 communication between PC and an AVR in mikroPascal
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
The lazarus part:
- Attachments
-
- uart b.jpg (54.39 KiB) Viewed 14821 times
Last edited by mikroSeven on 08 Jul 2016 19:31, edited 2 times in total.
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
After the Lazarus part has started, the next aperas on the Arduimo/LCD;
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
What it DOES show very well, is the funcionality of the so called Delimiter, in the procedure:
procedure UART_Read_Text(var Output : string[255]; var Delimiter : sting[10]; Attempts : byte);
I used the string '56' and the Arduino DID it ok!
procedure UART_Read_Text(var Output : string[255]; var Delimiter : sting[10]; Attempts : byte);
I used the string '56' and the Arduino DID it ok!
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
I placed the following allready before:
Oh I',m verry sorry!
I wasn't aware of any Arduino shields of MikroElektronica, www.mikroe.com !
To all readers of this topic: my shield is not from MilroElektronica, www.mikroe.com !
Sorry for any inconvenience!
All regards. Marcel
Oh I',m verry sorry!
I wasn't aware of any Arduino shields of MikroElektronica, www.mikroe.com !
To all readers of this topic: my shield is not from MilroElektronica, www.mikroe.com !
Sorry for any inconvenience!
All regards. Marcel
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
Transmitting from Lazarus to Arduino needs more investigation.
More next week
By the way: the Serial-UART-Terminal built within the mikroPascal-DE, is very useful!
Very nice tool to test RS232!
More next week
By the way: the Serial-UART-Terminal built within the mikroPascal-DE, is very useful!
Very nice tool to test RS232!
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
Hallo zusammen.
Erste RS232-Komunication zwischen pc-Lazarus und Arduino2560-mikroPascal functioniert!
In Lazarus wende (uses) ich LazSerial und Synaser an.
M.f.G.
Erste RS232-Komunication zwischen pc-Lazarus und Arduino2560-mikroPascal functioniert!
In Lazarus wende (uses) ich LazSerial und Synaser an.
M.f.G.
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
So far, so good!
Using a LazarusTimerComponent and send the pc-time to Arduino and get it displayed on an LCD.
Also have a LazarusControlBar and when moving by mousepointer, a LEDbar at Arduino shows the Progress.
Very nice! It's getting better each time!
Gonna practis/studdie more and then get my robotArm controllled by pc-Lazarus and Arduino-mikroPascal!
( it's still using pc-DOS/Turbopascal7.0 and ISA-82c55a )
Picture is showing 2 extra characters at beginnning of the string. Is due of something called 'AnsiChar'.
Partly solved: for the time being, I just removed the 2 chars at Arduino side.
Using a LazarusTimerComponent and send the pc-time to Arduino and get it displayed on an LCD.
Also have a LazarusControlBar and when moving by mousepointer, a LEDbar at Arduino shows the Progress.
Very nice! It's getting better each time!
Gonna practis/studdie more and then get my robotArm controllled by pc-Lazarus and Arduino-mikroPascal!
( it's still using pc-DOS/Turbopascal7.0 and ISA-82c55a )
Picture is showing 2 extra characters at beginnning of the string. Is due of something called 'AnsiChar'.
Partly solved: for the time being, I just removed the 2 chars at Arduino side.
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
Finaly , my setup for my robotArm, will be like this:
Got some Arduino's etc laying around, gonna use them!
Got some Arduino's etc laying around, gonna use them!
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
Abend!
Dat mach ja richtig spass!
Von PC zu LED's!
Dat mach ja richtig spass!
Von PC zu LED's!
To DIY or not to DIY
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: RS232 communication between PC and an AVR in mikroPascal
Hi,
I am glad your project is moving to the right direction, and the communication is working.
It would be great, once you wrap up and finish it, to post it on Libstock.
http://libstock.mikroe.com/
Kind regards,
Biljana
I am glad your project is moving to the right direction, and the communication is working.
It would be great, once you wrap up and finish it, to post it on Libstock.
http://libstock.mikroe.com/
Kind regards,
Biljana
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
Not much progress last weeks, here a video-shot, Lazarus-To-Arduino.
Next step: ADC-values ( mini-joysticks ) form Arduino-To-Lazarus.
https://www.youtube.com/watch?v=RZIEMfN ... EpFg4GsRwI
Next step: ADC-values ( mini-joysticks ) form Arduino-To-Lazarus.
https://www.youtube.com/watch?v=RZIEMfN ... EpFg4GsRwI
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
So, got something working stable!
PC-Lazarus, is kinda 'Master' and Arduino is kinda 'Slave'.
Lazarus sending each 100ms, Arduino waiting for data and sends it back...
Not the actual value of the ScrollBars are send but a 'kinda 'derivative' value to show a Sollid Led-BAR.
Like this scheme:
PC-Lazarus, is kinda 'Master' and Arduino is kinda 'Slave'.
Lazarus sending each 100ms, Arduino waiting for data and sends it back...
Not the actual value of the ScrollBars are send but a 'kinda 'derivative' value to show a Sollid Led-BAR.
Like this scheme:
- // 0 1 2 3 4 5 6 7 led
// 1 2 4 8 16 32 64 128 bin
// 0 1 3 7 15 31 63 127 dec
//16 48 80 112 144 176 208 240 tres
To DIY or not to DIY
-
- Posts: 161
- Joined: 14 Mar 2016 10:24
- Contact:
Re: RS232 communication between PC and an AVR in mikroPascal
For the time being,
I refer to this next topic on an forum outside of mikroE, including posts of myself, for more information and explanation of the Lazarus part.
http://forum.lazarus.freepascal.org/ind ... #msg220762
All regards!
I refer to this next topic on an forum outside of mikroE, including posts of myself, for more information and explanation of the Lazarus part.
http://forum.lazarus.freepascal.org/ind ... #msg220762
All regards!
To DIY or not to DIY