Attiny13 Software Uart Bascom

admin
Attiny13 Software Uart Bascom Rating: 3,6/5 4870 votes

Mar 16, 2017  Live TV from 60+ channels. No complicated set-up. No cable box required. Cancel anytime.

64 bytes of SRAM is plenty for this. BASCOM on the other hand sounds like NOT fun for implementing this one - especially when You have a very limited program space. The chip has a timer. Start with that one. Use interrupts and C. Maybe ASM if You dare. Actually this is a very simple thing to do if You need to send data from the chip.

Maybe the A/D conversion result? If You need to receive something as well then the thing becomes more elaborate involving use of the external interrupt in the RX wire. But this is still quite easy task.

I just need the TXD line. I only have the attiny13 rightnow. I need a little package micrcontroller. It must be in SMD package, because i don't have much space to place the attiny13. It will be used in an electronic key, so it must be small. Probably, i will have to write my own transmission protocole.

Now I have, an another problem. I was trying to set this AVR from 9.6MHz Clock with 64ms start time, to 4,8MHz with 64ms start time and it has blocked:/ Now I don't have an idea how to unlock it. If I could connect an extrenal clock, it not would be a problem to unblock but like you know, it's hard to connect an extrenal clock to attiny13:).

Hello, I have written a softUART transmitter for the Tiny13 in assembler. It sets the timer interrupt to the baud rate. At every overflow, it reloads the value to create the baud rate and checks if the main code has set up a byte for transmission.

Itunes duplicate remover. If a byte is to be sent out, it initializes a counter to ten and pulls an output pin low to create the start bit. Each subsequent interrupt shifts the LSB into the carry.

If carry set, out pin is made high, otherwise, it is made low. On each interrupt the counter is decremented. On count one, it creates the stop bit and sets a flag for the main program that indicates that it is ready for a new byte to be transmitted.

The timer interrupt routine is short; about thirty instructions. I can attach it if you would like to use it, but it is in assembler. Please feel free to translate it into C and repost it back to me, as I am trying to learn C.

I'm looking for a transmission protocole between two AVR processors: attiny13 atmega32, so there is no problem with voltage levels in RS-232 protocole. There is already a first version of my key.

It's featured on my homepage: [url] There I wrote a transmission protocole by myself and it worked. The transmission protocole was based on CLOCK line and DATA line (like in I2C) The programm of this key fits my transmission protocole and data to send to atmega32. The Data is: start bits, userID, 256-bit password, stop bits. Now I want to fit bigger password, so the transmission protocole has to be smaller.

Now i think the software RS-232 is not the best idea for my key. Simonetta - If you can I would be thankful for writing the code in assembler here. I will try to put an asm code into C or BASCOM code without translation. I don't know asm to translate it by myself. Maybe you would try to trnslate it into C? It would be gerat.

Bascom and AVR, RS-232. Bascom and AVR, RS-232.

RS-232 RS-232 is nowadays a 'mature' communication standard. It is surprising that a standard, defined in the early sixties, is still widely used today. Formally however, the name RS-232 does not apply to a standard. An American organisation, now known as the Electronic Industries Association, proposed a way to communicate between large mainframe computers and peripheral equipment such as terminals. The proposal was called a Recommended Standard and 232 was not more than a identifying number. Much later this became an official standard, EIA-232. In 1991, the latest version, EIA-232E was published.

However, the name RS-232 is still widely used and so shall I in these pages. RS-232 is a serial communication protocol. It sends information as bit after bit and has two signal levels: - a voltage between -3 and -25 Volts is a logic one (1) - a voltage between +3 and +25 Volts is a logic zero (0) As the picture above shows, the voltage level between -3 and +3 Volts is undefined. In practice this is not so. Most often, any voltage level above 2.5 Volts is seen as a logic zero, anything below as a logic one. The electrical specification of RS-232 is quite robust, all outputs must be able to sustain a full short-circuit and all inputs must have a schmitt-trigger action.

This makes a full-standard RS232 port on a PC much less vulnerable than a TTL-level parallel port. RS-232 is an a-synchronous protocol, meaning that no separate clock is transmitted with the data. Both sides must know the communication speed (we use the term baud-rate) beforehand. In the original version of RS-232, a maximum speed of 20.000 bits per second was defined. Now, speeds up to 1 Mbit/s are used. RS-232 defines a complete hardware handshaking system using several wiring pins.