Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - serial in AT mega8

(you are viewing a thread; or go back to list of threads)

serial in AT mega8 (by okulasi)
i have problem with my ATmega8 burn with firmware from serial.ld ...> compiled to serial.hex (originally sample from ldmicro)

see attachment
Thu Mar 25 2010, 00:54:02, download attachment I have problem with uart ATmega8 in LD micro2.doc
no subject (by simon)
Hi okulasi
post your ld program
Thu Mar 25 2010, 05:16:45
serial in atmega8 (by okulasi)
hi simon
thank you for your response

the ladder program already in directory ldmicro/sample/serial.ld
see attchment
Fri Mar 26 2010, 22:24:35, download attachment serial.ld
serial uart with atmega8 (by okulasi)
this is next trial for send analog via uart
The first problem
I use a 12Mhz crystal (12 Mhz in my opinion because I bought it new from the store) see the picture in the attachment.
ldmicro settings:
-12mhz crystal = (12.000000)
-cycle-10ms-100ms (I tried several times)
-baud = 2400-9600 (I tried several times)
settings in hyper terminal =
baudrate = fit / equal ldmicro settings (eg. ldmicro = 4800, hyper terminal = 4800)
results are:
the connection with the serial UART does not work.

TThe second problem
This is my experiment with adc atmega8, I do readings on the adc port and then sent via serial port. I run this program with hyper terminal.but adc port of Atmega8 as not to react .... I am using a potentiometer 10kOhm, I turned to the middle position of about ..... check Voltage = 2.5 volt.tetapi on hyper terminal display fixed 1023.

how to solve the problem....please
Fri Mar 26 2010, 23:33:30, download attachment adc.doc
ladder program (by okulasi)
the ladder program test adc.ld(attchment)
Fri Mar 26 2010, 23:36:40, download attachment TEST ADC.ld
fuse bit (by okulasi)
I searched on google
probably my fault in setting fuse bits
how to make the correct settings for the following applications:

MCU = ATmega 8
Crystal = 12mhz
cycle time= 10ms

thank,s
Sat Mar 27 2010, 00:01:16
no subject (by simon)
hi okulasi
i tested your program "TEST ADC.ld" on atmega8 .
probably you have a new chip never programed before and this is the main problem . When you buy a new atmega , they have a default fuse bits set for 1mhz oscilator . I testet your ld program whit default fuse bits and is ok . You need to make sure to conect Avcc ( pin20 ) to +5vcc and Aref ( pin21 ) to +5vcc . I used for programing PonyProg .
Attached file is PonyProg fuse bits for atmega8 to use crystals from 4mhz to 16mhz .
Atention to Avcc and Aref.
Sat Mar 27 2010, 06:45:28, download attachment mega8_fuse.rar
no subject (by simon)
if you don't use ponyprog , i will try tomorow to send to you the avrprog fuse bits .
Sat Mar 27 2010, 06:48:01
receive char over uart (by okulasi)
thanks simon
1.
fuse bit problem was ok .. your advice was right
now I can use the 12mhz crystal.
relationship with the hyper terminal is also ok
2.
ADC in avr with micro ld ok too ..
My mistake was not connecting pins 20 and 21 ..
thanks for the advice very useful

3 once more
I have a problem with receiving serial data(serial in)
See attached file.
in the hyper terminal I can not send serial data to the avr atmega8
Mon Mar 29 2010, 10:33:45, download attachment receive char over uart.ld
no subject (by simon)
hi okulasi

Test this program .
Mon Mar 29 2010, 13:57:03, download attachment receivecharoveruart2.ld
char over uart (by okulasi)
hi, Simon
I tried ATMEGA 16 results were the same. can not send char via UART.
how to make the correct settings on atmega8/16 to use this function(receive char over UART)
Wed Mar 31 2010, 00:16:45
(no subject) (by MGP)
I think there is nothing wrong with your LD program or Atmega.
Can you post your schematic on this forum, because i think that the hardware isn't correct.
Wed Mar 31 2010, 03:12:05
(no subject) (by MGP)
Sorry, i have found your board schematic in your first post.
Wed Mar 31 2010, 06:14:05
no subject (by simon)
okulasi you have this atach folder , i hope this helps .
Wed Mar 31 2010, 08:33:19, download attachment serial.rar
serial.rar (by okulasi)
Thanks,simon


being tested..............
Fri Apr 2 2010, 02:37:40
receive char over uart (by okulasi)
hi simon
I've tried your program .. result is the same, not work (from the hyper terminal can not send characters)

I tried to compile the program with BASCOM AVR as a comparison. I tried it on ATMega 8 the results is ok.With using HyperTerminal posible to transmit a character.(see attachment)


help me ... where is my fault
Sat Apr 3 2010, 12:23:43, download attachment uart2.doc
(no subject) (by haythem)
hello I have a problem with LDmicro it does not compile. when I do the pinning peak then I compile it shows that there is an error although the program is correct
Tue Apr 20 2010, 17:37:11, download attachment test.ld
no subject (by simon)
your mistake apear to be a bad name of input "Rmo" that probably should be "Rm0" . see atthaced files .
Wed Apr 21 2010, 04:11:09, download attachment haythem.rar
To haythem (by Rakesh)
in the very frist line you just wrote "Rmo" instead of "Rm0"
edit and compile.
enjoy
thanks
Sat Aug 7 2010, 04:18:42
BOUD RATE (by SEGAR)
HI, I HAVE DOWNLOAD AND OPEN THE LDMICRO SOFTWARE THE VERSION 4.1.0 WHAT I NOTICE IS THAT THE SOME SETTING BOUTRATE IS 1900,2400,4800 ITS FIX APPEAR IN THE SETTING ICON , HOW TO CHANGE THE BOUDRATE SUITE TO PROGRAMMER SETTING AND DEVICE IN THE BOUDRATE ICON.

THANKS
Sun Jan 8 2017, 01:42:45
(no subject) (by MGP)
You can only change the baudrate in the settings after you have used a UART instruction in your program.
Sun Jan 8 2017, 02:35:52
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):