Hi Majid, I think it is time for you to start reading some stuff about JAL and how to use it with PIC.
Try this guide: http://www.justanotherlanguage.org/sites/default/files/jallib_files/jallib%20starters%20guide_v101.pdf An introduction to JAL V2 & Jallib - Just Another JAL Website<http://www.justanotherlanguage.org/sites/default/files/jallib_files/jallib%20starters%20guide_v101.pdf> 3 Introduction JAL is a high-level language for PIC microcontrollers1 and originally developed by Wouter van Ooijen. JAL V2 (at this time of writing, the current version is V2.4n) is a re-write of the compiler, by Kyle York. www.justanotherlanguage.org Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens majid ebru <[email protected]> Verzonden: woensdag 21 april 2021 08:14 Aan: jallib <[email protected]> Onderwerp: Re: NT: [jallib] How to send & receive data over medium distance Now I can send and receive . How should I send a number for example 987 to other PIC? And How should I read data ? On Wednesday, April 21, 2021 at 10:22:01 AM UTC+4:30 majid ebru wrote: Thank you Ok I use RS232. But I can't read correctly data ,yet😫😢😫😢 Please guide me When I send "0x052" from pic1 , I received data in pic2 , but it is not correct If serial_sw_read(char)) then block .... lcd_cursor_position(1,5) print_byte_hex(lcd, char) -- ====> print 2B lcd_cursor_position(1,10) lcd = char. --. ====> Print + ...... On Wednesday, April 21, 2021 at 10:02:54 AM UTC+4:30 Kiste wrote: Thanks for the additional information, 800m is something very different from 20m ;-) I can imagine that 20m at 5V ground-referenced is doable, but when you're starting, better stick to the specifications and try your luck when you have a bit of experience. I myself am at a similar project, like 15 meter, and I want to use as little standby current as possible, and no twisted pairs. It's uni-directional, with constant-current pullup at the receiver and optically isolated pulldown at the sender with 1200 baud... First test of the concept in a few days ;-) If standby current was of no concern, I'd use RS422 or RS485 drivers/receivers, true RS232 is old-fashioned and needs to many components. Greets, Kiste Am Mittwoch, 21. April 2021, 07:02:46 MESZ hat vsurducan <[email protected]> Folgendes geschrieben: Oliver, I remember the problems I had with an EIA232 with +/-8V output running at 800m at 9600bps. Everything works until due the transceiver heating the voltage dropped at +/-7.6V...:) The length is given by the voltage at the level converter of the transmitter output. All level converters with charge pumps are not able to give more than +/-8V...+/-10V in the happiest circumstances. Oldest/goldest EIA232 worked at +/-25V up to 2km. For 20m you do noy need any level converter at the output of your PIC, just a twisted pair RX-GND TX-GND (CAT5 ethernet cable is perfect) and an open collector transmitter ( a gate) with pull-up resistor in the receiver end (at 20m distance from the transmitter). However Majid, I think you need first to learn jal and for that there is a learning curve which has to be passed.... Please start with the examples, compile them, make them run, modify them as you wish and post only when nothing works for you after three days of trying...this will help you more than you may believe right now... best wishes On Wed, Apr 21, 2021 at 7:28 AM 'Oliver Seitz' via jallib <[email protected]> wrote: > Hi Majid, > > SPI is designed for centimeters, I don't think it can work reliably over 20 > meters. > > RS232 at 9600 baud is ok for 150 meters, if you're using real RS232 drivers > and receivers like from the MAX232 series. The PIC controller does not have > RS232, it has a usart which handles the NRZ protocol. This protocol is best > known as being used by the RS232 interface. Therefore the protocol itself is > commonly (but wrongly) referred to as "RS232" > > RS232 uses negative voltages as a symbolic "1" and positive voltages for "0". > At the receiving side, the voltage must at least go higher than +3V for "0" > and lower than -3V for "1". At the sending side, voltages from up to +15V and > down to -15V are used. > > So, to answer your question in two simple sentences: RS232 is ok for the job. > But RS232 is not what comes out of the controller. > > Greets, > Kiste > > > > > Am Dienstag, 20. April 2021, 21:56:34 MESZ hat majid ebru > <[email protected]> Folgendes geschrieben: > > > > > > can i ask another question?? > > if it is 20 meter distance between PICs , i should use RS232 or SPI? > > so sorry and thanks a lot > > majid ebru در تاریخ سهشنبه ۲۰ آوریل ۲۰۲۱ ساعت > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jallib/1697687282.4677348.1618979276333%40mail.yahoo.com. > -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/CAM%2Bj4qtaBjojssk_HHFK1M2dhhL9CNNf3mygd1F3nH0B5bck9A%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/5c9f81de-8f9a-40cf-8802-b3a8493ad1a7n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/5c9f81de-8f9a-40cf-8802-b3a8493ad1a7n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/AM0PR07MB624152AC633C16586CB0E8ECE6479%40AM0PR07MB6241.eurprd07.prod.outlook.com.
