Was bored so decided to finally use this STM8S dev board. It works well. I just have to read up on it more to determine actual speed of MCU…
Here is my Code and Pictures… CODE
Was bored so decided to finally use this STM8S dev board. It works well. I just have to read up on it more to determine actual speed of MCU…
Here is my Code and Pictures… CODE
Hallo,
i´m an old boy (54)from germany. I have ordered the STM8s Kit. Your lib is cool. I will try this with a 20*4 Display.
regards Michael
Hallo,
I got the Kit yesterday and today the display is working! Thanks for your work!
Glad to hear that… im going to be making boards for this kit soon.
I might drop it tho… moving to PIC and AVR only now…
Hey,
Thanks for your library! You saved me a couple of hours 🙂
Klaas
No problem, Glad i could help out! Nice site by the way!
Hello Guys,
Does anyone tryed the STM8L-Discovery(LCD on the board) ? This is the Ultra low power version of this kit.
Thanks a lot.
Nakim.
hello.
Thank you for your code.
I want to know just what is the
component US2 between GND and VDD.
best regards
Its a POT i think i used a 1k (trimmer pot)
this code that you posted works when compiling? i am getting 3 errors.. also how does this code work without using #include stm8s_gpio.h? i am using raisonance btw.
*** ERROR C104 IN LINE 50 OF main.c : Invalid parameter declaration for ‘LCD_DATA’
*** ERROR C077 IN LINE 52 OF main.c : Invalid expression syntax
*** ERROR C077 IN LINE 53 OF main.c : Invalid expression syntax
I havent played with this in a LONG LONG time. If it works for everyone and not you it has to be something your doing… not to sound like a jerk tho. Um.. maybe you can goto the forums i goto and ask for some help 🙂
http://www.electro-tech-online.com/microcontrollers/
I’ve been working on converting your code over for the STM8L. There aren’t too many differences but I did want to poke back here to post a solution to this problem. I know that its a bit late for Will, but this may be able to help someone else. Also worth mentioning, I am compiling using raisonance.
With the error: Invalid parameter declaration for ‘LCD_DATA’
The variable names that are being used cause some issues with the raisonance compiler. Simply change the names of variables ‘data’ and ‘type’. So I did a “Find and Replace” to change ‘data’ to varData’ and ‘type’ to ‘varType’.
Also to anyone else converting to STM8L:
Remember that some defines are not all caps, so for example ‘GPIO_PIN_ALL’ would be ‘GPIO_Pin_All’
You will also need to replace all occurrences of:
GPIO_WriteLow(LCD_PORT,LCD_RS);
and
GPIO_WriteHigh(LCD_PORT,LCD_RS);
because these are not defined in the STM8L firmware provided. I got around this by defining at the top of main:
#define GPIO_HIGH(a,b) a->ODR|=b
#define GPIO_LOW(a,b) a->ODR&=~b
I then changed all of the ‘GPIO_WriteLow’ and ‘GPIO_WriteHigh’ occurrences accordingly.
I am further mutilating the code to work in 8-bit mode, when I’m finished I will post back here with a link. Thanks for sharing your code for this project Atomsoft. This has been a fantastic starting point for me to learn from!
After some thought I realize that the 8-bit version of this may not be great for everyone, as 4-bit mode is rather popular.
If you like, Atomsoft, you could email me and I will send you a txt of the version for a 4-bit STM8L interface for your visitors. Its the least I can do seeing that you have already done most of the work for us. I would post it in the comments section here but it seems like that would just be a big unformatted mess. Hopefully WordPress allows you to see my email address, if not post back and we can work something out.
WordPress does Nick, i just emailed you and thanks again 🙂
hmm.. well were you using the raisonance toolchain? and was main.c and stm8s.h the ONLY two files used in your project? i am probably just forgetting something dumb.. i am pretty new to this
hello,
I want to make a program that is triggered if there ‘s an event on PIN_7 (GPIOB)
I made a wired connection between PIN_7 (GPIOB) and PIN_3 (GPIOB) to test
I tried with this code but it does not work
#include “stm8s.h”
int main(void)
{
GPIO_DeInit(GPIOD);
GPIO_DeInit(GPIOB);
GPIO_Init(GPIOD, GPIO_PIN_0, GPIO_MODE_OUT_PP_LOW_FAST);
GPIO_Init(GPIOB, GPIO_PIN_3, GPIO_MODE_OUT_PP_LOW_FAST);
GPIO_Init(GPIOB, GPIO_PIN_7, GPIO_MODE_IN_PU_NO_IT);
GPIO_WriteLow(GPIOB, GPIO_PIN_3);
// i wille connect GPIOB, GPIO_PIN_3 with GPIO_PIN_7 to test
for(;;)
{
if ((GPIO_ReadInputData(GPIOB) & GPIO_PIN_7)== (u8)0x00)
GPIO_WriteHigh(GPIOD, GPIO_PIN_0);
else
{
u16 d;
for (d = 0; d < 10000; ++d)
{
nop();
}
GPIO_WriteReverse(GPIOD, GPIO_PIN_0);
}
}
}
can you give me a solution
cordially
sorry, I made a mistake with the pins.
it works now
thank you
Please atomsoft can you help me to programming LCD 2×16 on STM32VL Discovery ??
Please !!!
:))