Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Help _ simple examble for RX UART data
Goto page Previous  1, 2
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO
View previous topic :: View next topic  
Author Message
MIKRO_MAN

Bascom Member



Joined: 22 Jan 2015
Posts: 38

PostPosted: Fri Feb 12, 2016 12:39 pm    Post subject: Re: 1 or 4 Mhz Reply with quote

bzijlstra wrote:
From the factory the ATmega8 comes with its CKSEL fuses programmed for 1 Mhz.

What about your fusebit settings?

You got an atmega8 and a LED. Is it possible to write a small program to just blink the LED at an interval of 1 second?

And if you Print "AA" you are sending AA+CR+LF
If you just want to send "AA" you do a Print "AA";

Ben Zijlstra


about fuse
-Did not try practically Simulations only

Print "AA"; ok but i need to print in software to specific pin like [ Print #6 , "AA" ;] [#6] // output pin define it soft
[Open "comd.6:9600,8,n,1" For Output As #6]

whai is CR+LF mean ??how can i neglect it software[/quote]
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 827
Location: France

france.gif
PostPosted: Fri Feb 12, 2016 3:48 pm    Post subject: Reply with quote

From my school : 46 years old !

ASCII code 0 à 27 for serial use THOSE CHARACTERS ARE NOT PRINT OR DISPLAYED !
Note 0, 10 and 13 and 27



Code ASCII
0 Null
is not nothing ! you can send a chr(0) 'null
1 SOH
start of head
2 STX
start of text
3 ETX
end of tex
4 EOT
end of transmission
5 ENQ Who are you ?
6 ACK
Acknoledge
7 BEL
ring
8 BS
back slash 1 lettre en arrière
9 HT 1lettre en avant
10 LF
Line feed (avance d'une ligne)
11 VT
Vertical Tabulation
12 FF
Start new page 'début prochaine page
13 CR
(Carriage Return) retour chariot -à la ligne

17 DC1 XON
18 DC2 Contrôle dispo 2
19 DC3 XOFF
20 DC4 Contrôle dispo 4
21 NAK Bad reception Mal reçu
22 SYN
23 ETB Reçu? J'attends
24 CAN Annulé
25 EM
26 SUB End of file 'Fin de fichier
27 ESC


Wink JP
Back to top
View user's profile Visit poster's website
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Fri Feb 12, 2016 4:54 pm    Post subject: Inkey only 1 character Reply with quote

Dim value as string * 6

Value = inkey(#6)

Value gets only one character.
So it will never get "AA"

If you realy studied the weatherstation code you will notice that I use a buffer and with an INSTR check if the keywords pass by.

There is nothing wrong with your hardware.what is missing is a good crystal to get a correct baudrate.

At the start you mentioned things are working on single characters, so this must be the error.

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
aphawk

Bascom Member



Joined: 23 Jan 2010
Posts: 151
Location: Brazil

brazil.gif
PostPosted: Sat Feb 13, 2016 2:40 am    Post subject: Reply with quote

Hi Duval,

Well, many of us in this Forum have more than 50 years.... And we have worked sometimes witm modens and serial rs232 communications. I have worked with Apple ][ videotext in ASM , and have pained with the Hardware 1200 /75 bps communications and Videotext protocol here at Brazil.

I see all values you have posted for the Ascii code, and think .... today most schools don't teach this anymore !

What you ( and many of us ) think that is obvius, maybe is not so obvius because the learning today is focused in others communications types, like Rs422 and others.

Seeing this topic leaves me to think that we are like dinossaurs in the 20 century..... All our knowledge is useless to the new generation..... At least this is what the "new generation engineers" thinks....

If we tell something like 7 bits / even parity / 2 stop bits many people will think that we are crazy ! And if we mentioned something like the Baudot code , they will call the Mental Care to take us !!!

This topic is strange because only the old peoples understand that we cant have an "55AA" using the normal commands. We need to read two bytes and join the values !

Making the "new generation" people understand this is not an easy task !

Paulo
Back to top
View user's profile
Duval JP

Bascom Member



Joined: 22 Jun 2004
Posts: 827
Location: France

france.gif
PostPosted: Sat Feb 13, 2016 6:28 pm    Post subject: Reply with quote

thanks for your post Paulo,

É o velho panelas que fazemos os melhores doces Laughing I hope Bing translator work well !

Jean-Pierre
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-ARDUINO All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum